shebeiyunxing.vue 149 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111
  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="onDel" v-if="DelType === true" >删除</el-button>
  13. <el-button type="primary" class="bt" @click="onADD" v-if="AddType === true">新增</el-button>
  14. <el-button type="primary" class="bt" @click="hesuan" v-if="AddType === true">核算参数调整</el-button>
  15. <el-button type="primary" class="bt" @click="onADD" v-if="AddType === true">修正核算参数</el-button>
  16. <!-- <el-button type="primary" @click="onClear2" >换型清场</el-button> -->
  17. </header>
  18. <el-container>
  19. <layout-sider
  20. :resize-directions="['right']"
  21. :width="220"
  22. style="margin-right: 10px;"
  23. >
  24. <div
  25. class="JKWTree-tree"
  26. style="height: 70vh;"
  27. >
  28. <h3>设备运行跟踪</h3>
  29. <el-tree
  30. :data="treeData"
  31. highlight-current
  32. @node-click="handleNodeClick"
  33. />
  34. </div>
  35. </layout-sider>
  36. <el-container>
  37. <el-main>
  38. <div class="button-container" v-if="showbutton" style="height: 50%;width: 100%; flex: 1; border: 0px magenta solid; margin: 0; padding: 0;">
  39. <button v-for="(item, index) in machineData" :key="index" class="custom-button" @click="handleButtonClick(item.设备编号)">
  40. <img :src="`/src/assets/${item.状态}.png`" :alt="altText" style="max-width: 100%; height: auto;"/>
  41. <span style="margin-top: 8px;">{{ item.设备编号 + ' - ' + item.设备名称 }}</span>
  42. </button>
  43. </div>
  44. <div class="gva-search-box" v-if="JTMCOn" style="overflow: hidden; padding: 0; display: flex;">
  45. <div style="flex: 1; border: 0px magenta solid; margin: 0; padding: 0;">
  46. <el-row :gutter="20">
  47. <el-col :span="24">
  48. <el-form-item label="工单编号" prop="name">
  49. <el-row :gutter="20">
  50. <el-col :span="6">
  51. <el-input v-model="formData.工单编号" disabled :clearable="true" />
  52. </el-col>
  53. <el-col :span="18">
  54. <el-input v-model="formData.产品名称" disabled :clearable="true" />
  55. </el-col>
  56. </el-row>
  57. </el-form-item>
  58. </el-col>
  59. </el-row>
  60. <el-row :gutter="20">
  61. <el-col :span="6">
  62. <el-form-item label="印件编号" prop="id">
  63. <el-input v-model="formData.印件编号" disabled :clearable="true" />
  64. </el-form-item>
  65. </el-col>
  66. <el-col :span="17">
  67. <el-form-item label="工序名称" prop="name">
  68. <el-input v-model="formData.工序名称" disabled :clearable="true" />
  69. </el-form-item>
  70. </el-col>
  71. </el-row>
  72. <el-row :gutter="20">
  73. <el-col :span="4">
  74. <el-form-item label="班组成员" prop="id">
  75. </el-form-item>
  76. </el-col>
  77. </el-row>
  78. <el-row :gutter="1">
  79. <el-col :span="4">
  80. <el-input v-model="formData.sczl_bh1" disabled :clearable="true" />
  81. </el-col>
  82. <el-col :span="4">
  83. <el-input v-model="formData.sczl_bh2" disabled :clearable="true" />
  84. </el-col>
  85. <el-col :span="4">
  86. <el-input v-model="formData.sczl_bh3" disabled :clearable="true" />
  87. </el-col>
  88. <el-col :span="4">
  89. <el-input v-model="formData.sczl_bh4" disabled :clearable="true" />
  90. </el-col>
  91. <el-col :span="4">
  92. <el-input v-model="formData.sczl_bh5" disabled :clearable="true" />
  93. </el-col>
  94. <el-col :span="4">
  95. <el-input v-model="formData.sczl_bh6" disabled :clearable="true" />
  96. </el-col>
  97. </el-row>
  98. <el-row :gutter="1">
  99. <el-col :span="4">
  100. <el-input v-model="formData.sczl_name1" disabled :clearable="true" />
  101. </el-col>
  102. <el-col :span="4">
  103. <el-input v-model="formData.sczl_name2" disabled :clearable="true" />
  104. </el-col>
  105. <el-col :span="4">
  106. <el-input v-model="formData.sczl_name3" disabled :clearable="true" />
  107. </el-col>
  108. <el-col :span="4">
  109. <el-input v-model="formData.sczl_name4" disabled :clearable="true" />
  110. </el-col>
  111. <el-col :span="4">
  112. <el-input v-model="formData.sczl_name5" disabled :clearable="true" />
  113. </el-col>
  114. <el-col :span="4">
  115. <el-input v-model="formData.sczl_name6" disabled :clearable="true" />
  116. </el-col>
  117. </el-row>
  118. </div>
  119. <div style="flex: 1; border: 0px lawngreen solid; margin: 0; padding: 0; overflow: hidden;">
  120. <el-table
  121. tooltip-effect="dark"
  122. :data="selectData"
  123. row-key="ID"
  124. highlight-current-row="true"
  125. border
  126. style="width:100%;height: 30vh;"
  127. @row-dblclick="handleSelectClick"
  128. >
  129. <el-table-column
  130. prop="process"
  131. label="印件及工序"
  132. width="340"
  133. />
  134. <el-table-column
  135. prop="completed"
  136. label="已完成板数"
  137. width="150"
  138. />
  139. </el-table>
  140. </div>
  141. </div>
  142. <div v-if="JTMCOn" class="gva-table-box" >
  143. <div class="gva-btn-list">
  144. </div>
  145. <el-tabs v-model="activName" type="card" @tab-click="handleClick">
  146. <el-tab-pane label="设备作业清单" @click="showTable('印件资料')" name="first">
  147. <el-table ref="multipleTable"
  148. :show-overflow-tooltip="true"
  149. highlight-current-row="true"
  150. :row-style="{ height: '20px' }"
  151. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  152. :header-cell-style="{ padding: '0px' }"
  153. @row-click="yjupdateCompanyFunc"
  154. style="width: 100%;height: 330px" border tooltip-effect="dark" :data="sbzyData" row-key="ID" @selection-change="handleSelectionChange">
  155. <!-- <el-table-column type="selection" width="55" />-->
  156. <!-- <el-table-column align="left" label="选择" prop="bh" width="80"/> -->
  157. <el-table-column align="left" sortable label="工单编号|质量信息" prop="工单编号|质量信息" width="145" />
  158. <el-table-column align="left" sortable label="印件资料" prop="印件资料" width="240" />
  159. <el-table-column align="left" sortable label="工序名称" prop="工序名称" width="100" />
  160. <el-table-column align="left" sortable label="计划产量/已完成" prop="计划产量/已完成" width="130"/>
  161. <el-table-column align="left" sortable label="装版时数" prop="装版时数" width="85"/>
  162. <el-table-column align="left" sortable label="工序产能" prop="工序产能" width="85"/>
  163. <el-table-column align="left" sortable label="计划工时" prop="计划工时" width="85"/>
  164. <el-table-column align="left" sortable label="计划生产时段" prop="计划生产时段" width="210" />
  165. <el-table-column align="left" sortable label="排产备注" prop="排产备注" width="100" />
  166. <el-table-column align="left" sortable label="产品名称" prop="产品名称" width="240" />
  167. </el-table>
  168. </el-tab-pane>
  169. <el-tab-pane label="班组人员及分配比例" @click="showTable('工艺资料')" name="second">
  170. <el-table ref="multipleTable"
  171. highlight-current-row="true"
  172. :show-overflow-tooltip="true"
  173. :row-style="{ height: '20px' }"
  174. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  175. :header-cell-style="{ padding: '0px' }"
  176. @row-dblclick="gyupdateCompanyFunc"
  177. :row-class-name="rowClassStyle"
  178. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="FPData" row-key="ID" @selection-change="handleSelectionChange"
  179. @row-click="clickybupdate">
  180. <!-- <el-table-column type="selection" width="55" />-->
  181. <!-- <el-table-column align="left" label="选择" prop="方案" width="70"/> -->
  182. <el-table-column align="left" sortable label="班组号" prop="班组号" width="70" />
  183. <el-table-column align="left" sortable label="组员1" prop="0" width="200" />
  184. <el-table-column align="left" sortable label="组员2" prop="1" width="200" />
  185. <el-table-column align="left" sortable label="组员3" prop="2" width="200" />
  186. <el-table-column align="left" sortable label="组员4" prop="3" width="200" />
  187. <el-table-column align="left" sortable label="组员5" prop="4" width="200" />
  188. <el-table-column align="left" sortable label="组员6" prop="5" width="70" />
  189. <el-table-column align="left" sortable label="组员7" prop="6" width="70" />
  190. <el-table-column align="left" sortable label="组员8" prop="7" width="70" />
  191. <el-table-column align="left" sortable label="组员9" prop="8" width="70" />
  192. <el-table-column align="left" sortable label="组员10" prop="9_正品版" width="70" />
  193. </el-table>
  194. </el-tab-pane>
  195. <el-tab-pane label="当班产量明细" @click="showTable('印版资料')" name="third">
  196. <el-table ref="multipleTable"
  197. highlight-current-row="true"
  198. :show-overflow-tooltip="true"
  199. :row-style="{ height: '20px' }"
  200. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  201. :header-cell-style="{ padding: '0px' }"
  202. @row-dblclick="ybupdateCompanyFunc"
  203. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="CLMXData" row-key="ID" @selection-change="handleSelectionChange"
  204. >
  205. <!-- <el-table-column type="selection" width="55" />-->
  206. <el-table-column align="left" sortable label="生产时段" prop="生产时间段" width="180"/>
  207. <el-table-column align="left" sortable label="工单编号" prop="工单编号" width="85" />
  208. <el-table-column align="left" sortable label="产品名称" prop="产品名称" width="150" />
  209. <el-table-column align="left" sortable label="印件及工序" prop="印件及工序" width="320"/>
  210. <el-table-column align="left" sortable label="标牌号" prop="标牌号" width="80"/>
  211. <el-table-column align="left" sortable label="产量" prop="产量" width="100"/>
  212. <el-table-column align="left" sortable label="制程废品" prop="制程废品" width="100" />
  213. <el-table-column align="left" sortable label="制程次品" prop="制程次品" width="100" />
  214. <el-table-column align="left" sortable label="前工序废" prop="前工序废" width="100" />
  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="120"/>
  220. <el-table-column align="left" sortable label="通电工时" prop="通电工时" width="100"/>
  221. <el-table-column align="left" sortable label="码开始行" prop="码开始行" width="100" />
  222. <el-table-column align="left" sortable label="码结束行" prop="码结束行" width="100" />
  223. <el-table-column align="left" sortable label="码包" prop="码包" width="100" />
  224. <el-table-column align="left" sortable label="主电表" prop="主电表" width="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>
  228. </el-tab-pane>
  229. <el-tab-pane label="检验记录" @click="showTable('技术资料附件')" name="fourth">
  230. <el-table ref="multipleTable"
  231. :row-style="{ height: '20px' }"
  232. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  233. :header-cell-style="{ padding: '0px' }"
  234. :show-overflow-tooltip="true"
  235. highlight-current-row="true"
  236. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="JYData" row-key="ID" @selection-change="handleSelectionChange">
  237. <!-- <el-table-column type="selection" width="55" />-->
  238. <el-table-column align="left" sortable label="工单编号" prop="工单编号" width="85"/>
  239. <el-table-column align="left" sortable label="印件号" prop="印件号" width="70" />
  240. <el-table-column align="left" sortable label="工序名称" prop="工序名称" width="85" />
  241. <el-table-column align="left" sortable label="检验项目" prop="检验项目" width="85"/>
  242. <el-table-column
  243. v-for="time in columnNames"
  244. :key="time"
  245. :label="time"
  246. :prop="time"
  247. align="center"
  248. width="80"
  249. ></el-table-column>
  250. </el-table>
  251. </el-tab-pane>
  252. </el-tabs>
  253. </div>
  254. <el-dialog v-model="detailShow"
  255. fullscreen
  256. style="font-size: 50px;font-weight: bold;" lock-scroll :before-close="closeDetailShow" title="机台班组维护" destroy-on-close>
  257. <div>
  258. <el-table ref="multipleTable"
  259. :row-style="{ height: '20px' }"
  260. :cell-style="{ padding: '0px' ,color:'blue'}" :header-row-style="{ height: '20px' }"
  261. :header-cell-style="{ padding: '0px' }"
  262. :show-overflow-tooltip="true"
  263. highlight-current-row="true" @row-click="BZhandle"
  264. style="width: 100%;height: 250px;margin-top: 0px;" border tooltip-effect="dark"
  265. :data="bzData" row-key="ID" @selection-change="BZSelectionChange">
  266. <!-- <el-table-column type="selection" width="55" /> -->
  267. <el-table-column align="left" label="机台" prop="JTMC" width="70"/>
  268. <el-table-column align="left" label="班组" prop="班组号" width="60"/>
  269. <el-table-column align="left" label="组员1" prop="0" width="195"/>
  270. <el-table-column align="left" label="组员2" prop="1" width="195"/>
  271. <el-table-column align="left" label="组员3" prop="2" width="195"/>
  272. <el-table-column align="left" label="组员4" prop="3" width="195"/>
  273. <el-table-column align="left" label="组员5" prop="4" width="195"/>
  274. <el-table-column align="left" label="组员6" prop="5" width="100"/>
  275. <el-table-column align="left" label="组员7" prop="6" width="100"/>
  276. <el-table-column align="left" label="组员8" prop="7" width="100"/>
  277. <el-table-column align="left" label="组员9" prop="8" width="100"/>
  278. <el-table-column align="left" label="特殊组员" prop="9" width="100"/>
  279. <el-table-column align="left" label="UNIQID" prop="ID" width="100"/>
  280. </el-table>
  281. </div>
  282. <div style="margin-top:100px;">
  283. <el-row :gutter="20">
  284. <el-col :span="10">
  285. <el-form-item label="机台编号" prop="id">
  286. <el-select v-model="selectedOption" placeholder="请选择">
  287. <el-option
  288. v-for="item in dropdownOptions"
  289. :key="item.value"
  290. :label="item.label"
  291. :value="item.value"
  292. ></el-option>
  293. </el-select>
  294. </el-form-item>
  295. </el-col>
  296. <el-col :span="10">
  297. <el-form-item label="班组编号" prop="id">
  298. <el-input v-model="BZMC" placeholder="" />
  299. </el-form-item>
  300. </el-col>
  301. </el-row>
  302. <div style="display: flex;">
  303. <div class="groupbox float-div" style="height: 17vh; width: 130vh;">
  304. <span class="grouptitle">组员及分配比例</span>
  305. <el-row :gutter="10" style="margin-top: 0px; height: 5vh;">
  306. <el-col :span="2">
  307. <span></span>
  308. </el-col>
  309. <el-col :span="2">
  310. </el-col>
  311. <el-col :span="2">
  312. </el-col>
  313. <el-col :span="2">
  314. </el-col>
  315. <el-col :span="2">
  316. </el-col>
  317. <el-col :span="2">
  318. </el-col>
  319. <el-col :span="2">
  320. </el-col>
  321. <el-col :span="2">
  322. </el-col>
  323. <el-col :span="2">
  324. </el-col>
  325. <el-col :span="3">
  326. </el-col>
  327. <el-col :span="3">
  328. <el-form-item label="特殊组员" prop="id">
  329. </el-form-item>
  330. </el-col>
  331. </el-row>
  332. <el-row :gutter="10" style="margin-top: 0px;">
  333. <!-- <el-col :span="1">
  334. <span></span>
  335. </el-col> -->
  336. <el-col :span="3">
  337. <el-input v-model="formDatas.code1" @keyup.enter.native="getbzyg($event, '1')" placeholder="" />
  338. </el-col>
  339. <el-col :span="3">
  340. <el-input v-model="formDatas.code2" @keyup.enter.native="getbzyg($event, '2')" placeholder="" />
  341. </el-col>
  342. <el-col :span="3">
  343. <el-input v-model="formDatas.code3" @keyup.enter.native="getbzyg($event, '3')" placeholder="" />
  344. </el-col>
  345. <el-col :span="3">
  346. <el-input v-model="formDatas.code4" @keyup.enter.native="getbzyg($event, '4')" placeholder="" />
  347. </el-col>
  348. <el-col :span="3">
  349. <el-input v-model="formDatas.code5" @keyup.enter.native="getbzyg($event, '5')" placeholder="" />
  350. </el-col>
  351. <el-col :span="3">
  352. <el-input v-model="formDatas.code6" @keyup.enter.native="getbzyg($event, '6')" placeholder="" />
  353. </el-col>
  354. <el-col :span="3">
  355. <el-input v-model="formDatas.code7" @keyup.enter.native="getbzyg($event, '7')" placeholder="" />
  356. </el-col>
  357. <el-col :span="3">
  358. <el-input v-model="formDatas.code8" @keyup.enter.native="getbzyg($event, '8')" placeholder="" />
  359. </el-col>
  360. <!-- <el-col :span="2">
  361. <el-input v-model="formData.name" placeholder="瞿春生" />
  362. </el-col>
  363. <el-col :span="2">
  364. <el-input v-model="percentage" placeholder="11.0" />
  365. </el-col>
  366. <el-col :span="2">
  367. <el-input v-model="formData.qczl_NumDesc" placeholder="打包废纸" />
  368. </el-col>
  369. <el-col :span="2">
  370. <el-input v-model="formData.qczl_NumDesc" placeholder="是" />
  371. </el-col>
  372. <el-col :span="2">
  373. <el-input v-model="formData.qczl_NumDesc" placeholder="ZI00401" />
  374. </el-col>
  375. <el-col :span="2">
  376. <el-input v-model="formData.qczl_NumDesc" placeholder="瞿春生" />
  377. </el-col>
  378. <el-col :span="2">
  379. <el-input v-model="formData.qczl_NumDesc" placeholder="11.0" />
  380. </el-col>
  381. <el-col :span="2">
  382. <el-input v-model="formData.qczl_NumDesc" placeholder="11.0" />
  383. </el-col>
  384. <el-col :span="2">
  385. <el-input v-model="formData.qczl_NumDesc" placeholder="11.0" />
  386. </el-col> -->
  387. </el-row>
  388. <el-row :gutter="10" style="margin-top: 1px;">
  389. <!-- <el-col :span="2">
  390. <span></span>
  391. </el-col> -->
  392. <el-col :span="3">
  393. <el-input v-model="formDatas.name1" style="color:#00FF00" placeholder="" />
  394. </el-col>
  395. <el-col :span="3">
  396. <el-input v-model="formDatas.name2" placeholder="" />
  397. </el-col>
  398. <el-col :span="3">
  399. <el-input v-model="formDatas.name3" placeholder="" />
  400. </el-col>
  401. <el-col :span="3">
  402. <el-input v-model="formDatas.name4" placeholder="" />
  403. </el-col>
  404. <el-col :span="3">
  405. <el-input v-model="formDatas.name5" placeholder="" />
  406. </el-col>
  407. <el-col :span="3">
  408. <el-input v-model="formDatas.name6" placeholder="" />
  409. </el-col>
  410. <el-col :span="3">
  411. <el-input v-model="formDatas.name7" placeholder="" />
  412. </el-col>
  413. <el-col :span="3">
  414. <el-input v-model="formDatas.name8" placeholder="" />
  415. </el-col>
  416. <!-- <el-col :span="2">
  417. <el-input v-model="formData.qczl_NumDesc" placeholder="是" />
  418. </el-col>
  419. <el-col :span="2">
  420. <el-input v-model="formData.qczl_NumDesc" placeholder="ZI00401" />
  421. </el-col>
  422. <el-col :span="2">
  423. <el-input v-model="formData.qczl_NumDesc" placeholder="瞿春生" />
  424. </el-col>
  425. <el-col :span="2">
  426. <el-input v-model="formData.qczl_NumDesc" placeholder="11.0" />
  427. </el-col>
  428. <el-col :span="2">
  429. <el-input v-model="formData.qczl_NumDesc" placeholder="11.0" />
  430. </el-col>
  431. <el-col :span="2">
  432. <el-input v-model="formData.qczl_NumDesc" placeholder="11.0" />
  433. </el-col> -->
  434. </el-row>
  435. <el-row :gutter="10" style="margin-top: 1px;">
  436. <!-- <el-col :span="2">
  437. <span></span>
  438. </el-col> -->
  439. <el-col :span="3">
  440. <el-input v-model="formDatas.percentage1" placeholder="" />
  441. </el-col>
  442. <el-col :span="3">
  443. <el-input v-model="formDatas.percentage2" placeholder="" />
  444. </el-col>
  445. <el-col :span="3">
  446. <el-input v-model="formDatas.percentage3" placeholder="" />
  447. </el-col>
  448. <el-col :span="3">
  449. <el-input v-model="formDatas.percentage4" placeholder="" />
  450. </el-col>
  451. <el-col :span="3">
  452. <el-input v-model="formDatas.percentage5" placeholder="" />
  453. </el-col>
  454. <el-col :span="3">
  455. <el-input v-model="formDatas.percentage6" placeholder="" />
  456. </el-col>
  457. <el-col :span="3">
  458. <el-input v-model="formDatas.percentage7" placeholder="" />
  459. </el-col>
  460. <el-col :span="3">
  461. <el-input v-model="formDatas.percentage8" placeholder="" />
  462. </el-col>
  463. <!-- <el-col :span="2">
  464. <el-input v-model="formData.qczl_NumDesc" placeholder="是" />
  465. </el-col>
  466. <el-col :span="2">
  467. <el-input v-model="formData.qczl_NumDesc" placeholder="ZI00401" />
  468. </el-col>
  469. <el-col :span="2">
  470. <el-input v-model="formData.qczl_NumDesc" placeholder="瞿春生" />
  471. </el-col>
  472. <el-col :span="2">
  473. <el-input v-model="formData.qczl_NumDesc" placeholder="11.0" />
  474. </el-col>
  475. <el-col :span="2">
  476. <el-input v-model="formData.qczl_NumDesc" placeholder="11.0" />
  477. </el-col>
  478. <el-col :span="2">
  479. <el-input v-model="formData.qczl_NumDesc" placeholder="11.0" />
  480. </el-col> -->
  481. </el-row>
  482. </div>
  483. <div style="height: 50vh; width: 15vh;margin-top: 3vh;">
  484. <el-button type="text"></el-button>
  485. <el-button style="margin-bottom: 1vh; width:15vh;background-color:cornflowerblue;" @click="addBz" >新 增</el-button>
  486. <el-button style="margin-bottom: 1vh;width:15vh;background-color:cornflowerblue;" @click="selectBz" >更新当前班组</el-button>
  487. <el-button style="margin-bottom: 1vh;width:15vh;background-color:cornflowerblue;" @click="delBz" >删除当前班组</el-button>
  488. </div>
  489. </div>
  490. </div>
  491. </el-dialog>
  492. <el-dialog
  493. v-model="dianjianVisible"
  494. title="设备点检记录"
  495. destroy-on-close
  496. width="1300px"
  497. style="height: 80%;"
  498. >
  499. <el-row :gutter="24">
  500. <el-col :span="3">
  501. <el-form-item label="设备编号" prop="id">
  502. <el-input v-model="formData.JTMC" :clearable="true" />
  503. </el-form-item>
  504. </el-col>
  505. <el-col :span="10">
  506. <el-row>
  507. <el-col>
  508. <el-input v-model="formData.产品名称" :clearable="true" />
  509. </el-col>
  510. </el-row>
  511. </el-col>
  512. </el-row>
  513. <div style="display: flex;">
  514. <div style="flex: 0.1;">
  515. <el-aside width="200px" style="margin: 0;">
  516. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  517. <el-tree :data="dianjiantreeData" :props="defaultProps" highlight-current="true"
  518. @node-click="dianjianNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
  519. </div>
  520. </el-aside>
  521. </div>
  522. <div style="flex: 1; margin: 0;">
  523. <el-table
  524. tooltip-effect="dark"
  525. :data="dianjianselectData"
  526. row-key="ID"
  527. highlight-current-row="true"
  528. :show-overflow-tooltip="true"
  529. border @row-click="dianjianhandle"
  530. style="width:100%; height:400px;"
  531. @row-dblclick="handleSelectClick"
  532. :row-class-name="rowClassName"
  533. >
  534. <el-table-column
  535. prop="检验项目"
  536. label="检验项目"
  537. width="300"
  538. />
  539. <el-table-column
  540. prop="点检方法"
  541. label="点检方法"
  542. width="180"
  543. />
  544. <el-table-column
  545. v-slot="scope"
  546. label="正常"
  547. width="80"
  548. >
  549. <el-checkbox v-model="scope.row.zc" @change="zcClick(scope.row)"></el-checkbox>
  550. </el-table-column>
  551. <el-table-column
  552. v-slot="scope"
  553. label="异常"
  554. width="80"
  555. >
  556. <el-checkbox v-model="scope.row.yc" @change="ycClick(scope.row)"></el-checkbox>
  557. </el-table-column>
  558. <el-table-column
  559. label="备注说明"
  560. width="180"
  561. >
  562. </el-table-column>
  563. <el-table-column
  564. v-slot="scope"
  565. label="不检测"
  566. width="80"
  567. >
  568. <el-checkbox v-model="scope.row.notjc" @change="notjcClick(scope.row)"></el-checkbox>
  569. </el-table-column>
  570. </el-table>
  571. <el-row :gutter="20">
  572. <el-col :span="20">
  573. <el-input v-model="pandingfangfa" style="height: 50px;" :clearable="true" />
  574. </el-col>
  575. </el-row>
  576. </div>
  577. </div>
  578. </el-dialog>
  579. <el-dialog
  580. v-model="yinbanVisible"
  581. title="选择"
  582. destroy-on-close
  583. width="1300px"
  584. style="height: 110%;"
  585. >
  586. <el-row :gutter="24">
  587. <el-col :span="4">
  588. <el-form-item label="工单编号" prop="id">
  589. <el-input v-model="formData.工单编号" :clearable="true" />
  590. </el-form-item>
  591. </el-col>
  592. <el-col :span="6">
  593. <el-form-item prop="id">
  594. <el-input v-model="formData.productCode" :clearable="true" />
  595. </el-form-item>
  596. </el-col>
  597. <el-col :span="14">
  598. <el-form-item prop="id">
  599. <el-input v-model="formData.产品名称" :clearable="true" />
  600. </el-form-item>
  601. </el-col>
  602. </el-row>
  603. <div style="display: flex;">
  604. <div style="flex: 1;">
  605. <el-aside width="250px" style="margin: 0;">
  606. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  607. <el-tree :data="yinbantreeData" :props="defaultProps" highlight-current="true"
  608. @node-click="yinbanNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
  609. </div>
  610. </el-aside>
  611. </div>
  612. <div style="flex: 1; margin: 0;">
  613. <el-table
  614. tooltip-effect="dark"
  615. :data="yinbanselectData"
  616. row-key="ID"
  617. highlight-current-row="true"
  618. border @row-click="dianjianhandle"
  619. style="width:1000px; height:400px;"
  620. @row-dblclick="handleSelectClick"
  621. :row-class-name="rowClassName"
  622. >
  623. <el-table-column
  624. prop="存货编码"
  625. label="存货编码"
  626. width="180"
  627. />
  628. <el-table-column
  629. prop="存货名称"
  630. label="存货名称"
  631. width="180"
  632. />
  633. <el-table-column
  634. prop="印版名称"
  635. label="印版名称"
  636. width="180"
  637. />
  638. <el-table-column
  639. prop="供方批号"
  640. label="供方批号"
  641. width="180"
  642. />
  643. <el-table-column
  644. prop="制造日期"
  645. label="制造日期"
  646. width="180"
  647. />
  648. <el-table-column
  649. prop="印数"
  650. label="印数"
  651. width="180"
  652. />
  653. <el-table-column
  654. prop="印版类别"
  655. label="印版类别"
  656. width="180"
  657. />
  658. <el-table-column
  659. prop="客户编号"
  660. label="客户编号"
  661. width="180"
  662. />
  663. <el-table-column
  664. prop="客户名称"
  665. label="客户名称"
  666. width="180"
  667. />
  668. <el-table-column
  669. prop="产品编号"
  670. label="产品编号"
  671. width="180"
  672. />
  673. <el-table-column
  674. prop="产品名称"
  675. label="产品名称"
  676. width="180"
  677. />
  678. <el-table-column
  679. prop="点检方法"
  680. label="备注说明"
  681. width="180"
  682. />
  683. <el-table-column
  684. prop="点检方法"
  685. label="备注说明"
  686. width="180"
  687. />
  688. </el-table>
  689. </div>
  690. </div>
  691. </el-dialog>
  692. <el-dialog
  693. v-model="xunchaVisible"
  694. title="管理人员现场巡查记录"
  695. destroy-on-close
  696. width="1300px"
  697. style="height: 65%;"
  698. >
  699. <div style="display: flex;">
  700. <div style="flex: 1;">
  701. <el-aside width="250px" style="margin: 0;">
  702. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  703. <el-tree :data="xunchatreeData" :props="defaultProps" highlight-current="true"
  704. @node-click="xunchaNodeClick"></el-tree>
  705. </div>
  706. </el-aside>
  707. </div>
  708. <div style="flex: 1; margin: 0;">
  709. <el-table
  710. tooltip-effect="dark"
  711. :data="xunchaselectData"
  712. row-key="ID"
  713. highlight-current-row="true"
  714. border @row-click="dianjianhandle"
  715. style="width:1000px; height:400px;"
  716. @row-dblclick="handleSelectClick"
  717. :row-class-name="rowClassName"
  718. :show-overflow-tooltip="true"
  719. >
  720. <el-table-column
  721. prop="工单编号"
  722. label="工序编号"
  723. width="85"
  724. />
  725. <el-table-column
  726. prop="印件号"
  727. label="印件号"
  728. width="70"
  729. />
  730. <el-table-column
  731. prop="工序名称"
  732. label="工序名称"
  733. width="180"
  734. />
  735. <el-table-column
  736. prop="流程单号"
  737. label="流程单号"
  738. width="85"
  739. />
  740. <el-table-column
  741. prop="设备编号"
  742. label="设备编号"
  743. width="85"
  744. />
  745. <el-table-column
  746. prop="班组编号"
  747. label="班组编号"
  748. width="85"
  749. />
  750. <el-table-column
  751. prop="检验备注"
  752. label="检验备注"
  753. width="85"
  754. />
  755. <el-table-column
  756. prop="现场管理人员"
  757. label="现场管理人员"
  758. width="145"
  759. />
  760. <el-table-column
  761. prop="提交时间"
  762. label="提交时间"
  763. width="160"
  764. />
  765. <el-table-column
  766. prop="开工时间"
  767. label="开工时间"
  768. width="160"
  769. />
  770. <el-table-column
  771. prop="分钟差数"
  772. label="分钟差数"
  773. width="85"
  774. />
  775. <el-table-column
  776. prop="归属时段"
  777. label="归属时段"
  778. width="160"
  779. />
  780. </el-table>
  781. </div>
  782. </div>
  783. <template #footer>
  784. <div class="dialog-footer">
  785. <!-- <el-button @click="closeDialog">关 闭</el-button> -->
  786. <!-- <el-button type="primary" @click="xunjianerDialog">提 交</el-button> -->
  787. </div>
  788. </template>
  789. </el-dialog>
  790. <el-dialog
  791. v-model="zhichengVisible"
  792. title="制程检验记录"
  793. destroy-on-close
  794. width="1100px"
  795. style="height: 78%;"
  796. >
  797. <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
  798. <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
  799. <el-form-item label="工单编号" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  800. <el-input v-model="xunchaData.order" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  801. </el-form-item>
  802. </el-col>
  803. <el-col :span="9" style="margin-top=0px; margin-bottom: 0px;">
  804. <el-row style="margin-top=0px; margin-bottom: 0px;">
  805. <el-col style="margin-top=0px; margin-bottom: 0px;">
  806. <el-input v-model="xunchaData.product_name" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  807. </el-col>
  808. </el-row>
  809. </el-col>
  810. <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
  811. <el-form-item label="流程单" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  812. <el-input v-model="xunchaData.lcdh" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  813. </el-form-item>
  814. </el-col>
  815. </el-row>
  816. <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
  817. <el-col :span="3" style="margin-top=0px; margin-bottom: 0px;">
  818. <el-form-item label="印件编号" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  819. <el-input v-model="xunchaData.yjno" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  820. </el-form-item>
  821. </el-col>
  822. <el-col :span="10" style="margin-top=0px; margin-bottom: 0px;">
  823. <el-row style="margin-top=0px; margin-bottom: 0px;">
  824. <el-col style="margin-top=0px; margin-bottom: 0px;">
  825. <el-input v-model="xunchaData.gxmc" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  826. </el-col>
  827. </el-row>
  828. </el-col>
  829. </el-row>
  830. <div style="display: flex;">
  831. <div style="flex: 0.1;">
  832. <el-aside width="180px" style="margin: 0;">
  833. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  834. <el-tree :data="zhichengtreeData" :props="defaultProps" highlight-current="true"
  835. @node-click="zhichengNodeClick"></el-tree>
  836. </div>
  837. </el-aside>
  838. </div>
  839. <div v-if="zhichengstatus" style="flex: 0; margin: 0;">
  840. <el-tabs v-model="activNames" type="card" @tab-click="handleClick">
  841. <el-tab-pane label="指标检验" @click="showTable('指标检验')" name="first">
  842. <el-table tooltip-effect="dark" :data="zhibiaoselectData" row-key="ID" highlight-current-row="true" :show-overflow-tooltip="true" border style="width:100%; height:310px;" :row-class-name="rowClassName" > <el-table-column prop="检验项目" label="检验项目" width="270" /> <el-table-column label="不检测" width="70"> <template v-slot="scope"> <el-radio v-model="scope.row.selected" label="不检测"> <span style="visibility: hidden;">不检测</span> </el-radio> </template> </el-table-column> <el-table-column label="合格" width="60"> <template v-slot="scope"> <el-radio v-model="scope.row.selected" label="合格"> <span style="visibility: hidden;">合格</span> </el-radio> </template> </el-table-column> <el-table-column label="不合格" width="70"> <template v-slot="scope"> <el-radio v-model="scope.row.selected" label="不合格"> <span style="visibility: hidden;">不合格</span> </el-radio> </template> </el-table-column> <el-table-column prop="检测方法" label="检测方法" width="90" /> <el-table-column prop="检验频率" label="检验频率" width="150" /> <el-table-column prop="相关标准" label="相关标准" width="180" /> </el-table>
  843. </el-tab-pane>
  844. <el-tab-pane label="附加检验记录" @click="showTable('附加检验记录')" name="second">
  845. <el-table
  846. tooltip-effect="dark"
  847. :data="fujiaselectData"
  848. row-key="ID"
  849. highlight-current-row="true"
  850. :show-overflow-tooltip="true"
  851. border @row-click="dianjianhandle"
  852. style="width:100%; height:320px;"
  853. @row-dblclick="handleSelectClick"
  854. :row-class-name="rowClassName"
  855. >
  856. <el-table-column
  857. v-slot="scope"
  858. label="不检测"
  859. width="75"
  860. >
  861. <el-checkbox v-model="scope.row.notjc"></el-checkbox>
  862. </el-table-column>
  863. <el-table-column
  864. prop="缺陷备注"
  865. label="缺陷及记录"
  866. width="720"
  867. />
  868. <el-table-column
  869. prop="编号"
  870. label="编号"
  871. width="80"
  872. />
  873. </el-table>
  874. </el-tab-pane>
  875. </el-tabs>
  876. </div>
  877. </div>
  878. <template #footer>
  879. <div v-if="zhichengstatus" class="dialog-footer">
  880. <el-button @click="closezhichengDialog">关 闭</el-button>
  881. <el-button type="primary" @click="zhichengDialog">提 交</el-button>
  882. </div>
  883. </template>
  884. </el-dialog>
  885. <div v-if="dateOn" >
  886. <el-tabs v-model="activName" type="card" @tab-click="handleClick">
  887. <el-tab-pane label="当日上报产量" @click="showTable('工艺资料')" name="first">
  888. <el-table ref="multipleTable"
  889. :show-overflow-tooltip="true"
  890. :row-style="{ height: '20px' }"
  891. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  892. :header-cell-style="{ padding: '0px' }" @row-click="getUid"
  893. highlight-current-row="true" @row-dblclick="gytableDatadoubleClick"
  894. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
  895. <el-table-column type="selection" width="55" />
  896. <!-- <el-table-column align="left" label="选择" prop="工单编号" width="100"/> -->
  897. <el-table-column align="left" label="产品名称" prop="产品名称" width="200"/>
  898. <el-table-column align="left" label="工序" prop="工序" width="100"/>
  899. <el-table-column align="left" label="备注" prop="备注" width="100"/>
  900. <el-table-column align="left" label="产量" prop="产量" width="70"/>
  901. <el-table-column align="left" label="千件工价" prop="千件工价" width="85"/>
  902. <el-table-column align="left" label="日定额" prop="日定额" width="85"/>
  903. <el-table-column align="left" label="补产标准" prop="补产标准" width="85"/>
  904. <el-table-column align="left" label="难度系数" prop="难度系数" width="85"/>
  905. <el-table-column align="left" label="印刷方式" prop="印刷方式" width="85"/>
  906. <el-table-column align="left" label="组员1" prop="组员1" width="170" />
  907. <el-table-column align="left" label="组员2" prop="组员2" width="170" />
  908. <el-table-column align="left" label="组员3" prop="组员3" width="170" />
  909. <el-table-column align="left" label="组员4" prop="组员4" width="170" />
  910. <el-table-column align="left" label="组员5" prop="组员5" width="70" />
  911. <el-table-column align="left" label="组员6" prop="组员6" width="70" />
  912. <el-table-column align="left" label="组员7" prop="组员7" width="70" />
  913. <el-table-column align="left" label="组员8" prop="组员8" width="70" />
  914. <el-table-column align="left" label="组员9" prop="组员9" width="70" />
  915. <el-table-column align="left" label="组员10" prop="组员10" width="70" />
  916. <el-table-column align="left" label="制程废品" prop="制程废品" width="85" />
  917. <el-table-column align="left" label="制程次品" prop="制程次品" width="85" />
  918. <el-table-column align="left" label="前工序废" prop="前工序废" width="85" />
  919. <el-table-column align="left" label="来料异常" prop="来料异常" width="85"/>
  920. <el-table-column align="left" label="装版工时" prop="装版工时" width="85" />
  921. <el-table-column align="left" label="保养工时" prop="保养工时" width="85" />
  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="110"/>
  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="70" />
  930. <el-table-column align="left" label="主电表" prop="主电表" width="70"/>
  931. <el-table-column align="left" label="辅电表" prop="辅电表" width="70" />
  932. <el-table-column align="left" label="色度数" prop="色度数" width="70" />
  933. <el-table-column align="left" label="用户" prop="用户" width="210" />
  934. <el-table-column align="left" label="更新时间" prop="更新时间" width="160" />
  935. </el-table>
  936. </el-tab-pane>
  937. <el-tab-pane label="当日制程检验记录" @click="showTable('印件资料')" name="second">
  938. <el-table ref="multipleTable"
  939. :row-style="{ height: '20px' }"
  940. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  941. :header-cell-style="{ padding: '0px' }"
  942. :show-overflow-tooltip="true"
  943. highlight-current-row="true"
  944. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="drzcDatas" row-key="ID" @selection-change="handleSelectionChange">
  945. <el-table-column type="selection" width="55" />
  946. <el-table-column align="left" label="工单编号" prop="工单编号" width="85"/>
  947. <el-table-column align="left" label="印件号" prop="印件号" width="70" />
  948. <el-table-column align="left" label="工序名称" prop="工序名称" width="85" />
  949. <el-table-column align="left" label="检验项目" prop="检验项目" width="85"/>
  950. <el-table-column
  951. v-for="time in columnNames"
  952. :key="time"
  953. :label="time"
  954. :prop="time"
  955. align="center"
  956. width="80"
  957. ></el-table-column>
  958. </el-table>
  959. </el-tab-pane>
  960. </el-tabs>
  961. </div>
  962. <el-dialog v-model="complaintsShow" style="width: 1000px" lock-scroll :before-close="closecomplaintsShow" title="=客诉记录" destroy-on-close>
  963. <el-table ref="multipleTable"
  964. :row-style="{ height: '20px' }"
  965. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  966. :header-cell-style="{ padding: '0px' }"
  967. :show-overflow-tooltip="true"
  968. highlight-current-row="true" @row-click="complaintshandle"
  969. style="width: 100%;height: 250px;margin-top: 0px;" border tooltip-effect="dark"
  970. :data="complaintsData" row-key="ID" @selection-change="complaintsSelectionChange">
  971. <!-- <el-table-column type="selection" width="55" /> -->
  972. <el-table-column align="left" label="产品编号" prop="产品编号" width="120"/>
  973. <el-table-column align="left" label="产品名称" prop="产品名称" width="200"/>
  974. <el-table-column align="left" label="客诉日期" prop="客诉日期" width="120"/>
  975. <el-table-column align="left" label="客诉单号" prop="客诉单号" width="120"/>
  976. <el-table-column align="left" label="客诉方式" prop="客诉方式" width="100"/>
  977. <el-table-column align="left" label="订单编号" prop="订单编号" width="100"/>
  978. <el-table-column align="left" label="缺陷关键字" prop="缺陷关键字" width="140"/>
  979. <el-table-column align="left" label="客诉性质" prop="客诉性质" width="100"/>
  980. <el-table-column align="left" label="主要责任部门" prop="主要责任部门" width="140"/>
  981. <el-table-column align="left" label="次要责任部门" prop="次要责任部门" width="140"/>
  982. </el-table>
  983. <el-row :gutter="20">
  984. <el-col :span="6">
  985. <el-form-item label="客户编号" prop="id">
  986. <el-input v-model="selectedRowData.客户编号" :clearable="true" placeholder="" />
  987. </el-form-item>
  988. </el-col>
  989. <el-col :span="15">
  990. <el-form-item label="客户名称" prop="id">
  991. <el-input v-model="selectedRowData.客户名称" :clearable="true" placeholder="" />
  992. </el-form-item>
  993. </el-col>
  994. </el-row>
  995. <el-row :gutter="20">
  996. <el-col :span="6">
  997. <el-form-item label="客诉单号" prop="id">
  998. <el-input v-model="selectedRowData.客诉单号" :clearable="true" placeholder="" />
  999. </el-form-item>
  1000. </el-col>
  1001. <el-col :span="5">
  1002. <el-form-item label="客诉日期" prop="id">
  1003. <el-input v-model="selectedRowData.客诉日期" :clearable="true" placeholder="" />
  1004. </el-form-item>
  1005. </el-col>
  1006. <el-col :span="5">
  1007. <el-form-item label="方式" prop="id">
  1008. <el-input v-model="selectedRowData.客诉方式" :clearable="true" placeholder="" />
  1009. </el-form-item>
  1010. </el-col>
  1011. <el-col :span="5">
  1012. <el-form-item label="批次号" prop="id">
  1013. <el-input v-model="selectedRowData.订单编号" :clearable="true" placeholder="" />
  1014. </el-form-item>
  1015. </el-col>
  1016. </el-row>
  1017. <el-row :gutter="20">
  1018. <el-col :span="20">
  1019. <el-form-item label="反馈问题" prop="id">
  1020. <el-input v-model="selectedRowData.客诉描述" :clearable="true" placeholder="" />
  1021. </el-form-item>
  1022. </el-col>
  1023. </el-row>
  1024. <el-row :gutter="20">
  1025. <el-col :span="20">
  1026. <el-form-item label="缺陷关键字" prop="id">
  1027. <el-input v-model="selectedRowData.缺陷关键字" :clearable="true" placeholder="" />
  1028. </el-form-item>
  1029. </el-col>
  1030. </el-row>
  1031. <el-row :gutter="20">
  1032. <el-col :span="5">
  1033. <el-form-item label="性质" prop="id">
  1034. <el-input v-model="selectedRowData.客诉性质" :clearable="true" placeholder="" />
  1035. </el-form-item>
  1036. </el-col>
  1037. <el-col :span="5">
  1038. <el-form-item label="扣分" prop="id">
  1039. <el-input v-model="selectedRowData.扣分" :clearable="true" placeholder="" />
  1040. </el-form-item>
  1041. </el-col>
  1042. </el-row>
  1043. <div style="display: flex;">
  1044. </div>
  1045. </el-dialog>
  1046. <el-dialog
  1047. v-model="huanxingVisible"
  1048. title="换型清场"
  1049. destroy-on-close
  1050. width="145vh"
  1051. style="height: 78vh;"
  1052. :before-close="closehuanxingVisible"
  1053. >
  1054. <div style="display: flex;">
  1055. <div style="flex: 0.1;">
  1056. <el-aside width="26vh" style="margin: 0;">
  1057. <div class="JKWTree-tree" style="height: 60vh; border-right: 1px solid #ebeef5;">
  1058. <el-tree :data="huanxingtreeData" :props="defaultProps" highlight-current="true"
  1059. @node-click="huanxingNodeClick"></el-tree>
  1060. </div>
  1061. </el-aside>
  1062. </div>
  1063. <div v-if="huanxingstatus" style="flex: 0; margin: 0;">
  1064. <el-tabs v-model="activNames" type="card" @tab-click="handleClick">
  1065. <el-tab-pane label="换型清场明细信息" @click="showTable('换型清场明细信息')" name="first">
  1066. <div style="width:110vh">
  1067. <el-descriptions :column="9" border>
  1068. <el-descriptions-item :span="9">
  1069. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1070. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1071. <el-form-item label="日期:" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  1072. <el-input v-model="huanxingData.日期" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  1073. </el-form-item>
  1074. </el-col>
  1075. <el-col :span="2" style="margin-bottom: 0px;margin-top: 0px;">
  1076. </el-col>
  1077. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1078. <el-form-item label="机台编号:" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  1079. <el-input v-model="huanxingData.机台编号" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  1080. </el-form-item>
  1081. </el-col>
  1082. <el-col :span="1" style="margin-bottom: 0px;margin-top: 0px;">
  1083. </el-col>
  1084. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1085. <el-form-item label="班组:" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  1086. <el-input v-model="huanxingData.班组" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  1087. </el-form-item>
  1088. </el-col>
  1089. </el-row>
  1090. </el-descriptions-item>
  1091. <el-descriptions-item label="清场原因 从" :span="9">
  1092. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1093. <el-col :span="8" style="margin-bottom: 0px;margin-top: 0px;">
  1094. <el-form-item label="工单编号:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1095. <el-input v-model="huanxingData.工单编号A" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1096. </el-form-item>
  1097. </el-col>
  1098. <el-col :span="16" style="margin-bottom: 0px;margin-top: 0px;">
  1099. <el-form-item label="印件名称:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1100. <el-input v-model="huanxingData.印件名称A" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1101. </el-form-item>
  1102. </el-col>
  1103. </el-row>
  1104. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1105. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1106. <el-form-item label="印件工序:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1107. <el-input v-model="huanxingData.印件工序A" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1108. </el-form-item>
  1109. </el-col>
  1110. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1111. </el-col>
  1112. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1113. <el-form-item label="码包号" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1114. <el-input v-model="huanxingData.码包号A" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1115. </el-form-item>
  1116. </el-col>
  1117. </el-row>
  1118. </el-descriptions-item>
  1119. <el-descriptions-item label="清场原因 到" :span="9">
  1120. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1121. <el-col :span="8" style="margin-bottom: 0px;margin-top: 0px;">
  1122. <el-form-item label="工单编号:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1123. <el-input v-model="huanxingData.工单编号B" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1124. </el-form-item>
  1125. </el-col>
  1126. <el-col :span="16" style="margin-bottom: 0px;margin-top: 0px;">
  1127. <el-form-item label="印件名称:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1128. <el-input v-model="huanxingData.印件名称B" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1129. </el-form-item>
  1130. </el-col>
  1131. </el-row>
  1132. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1133. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1134. <el-form-item label="印件工序:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1135. <el-input v-model="huanxingData.印件工序B" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1136. </el-form-item>
  1137. </el-col>
  1138. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1139. </el-col>
  1140. <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
  1141. <el-form-item label="码包号" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1142. <el-input v-model="huanxingData.码包B" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1143. </el-form-item>
  1144. </el-col>
  1145. </el-row>
  1146. </el-descriptions-item>
  1147. <el-descriptions-item label="清场确认项目" :span="9">
  1148. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1149. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1150. <el-form-item label="菲林_标样_签样品_留样品" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1151. <el-checkbox v-model="huanxingData.项目1"></el-checkbox>
  1152. </el-form-item>
  1153. </el-col>
  1154. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1155. <el-form-item label="版材_纸张_电化铝_油墨" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1156. <el-checkbox v-model="huanxingData.项目2"></el-checkbox>
  1157. </el-form-item>
  1158. </el-col>
  1159. </el-row>
  1160. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1161. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1162. <el-form-item label="过版纸_废品_次品" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1163. <el-checkbox v-model="huanxingData.项目3"></el-checkbox>
  1164. </el-form-item>
  1165. </el-col>
  1166. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1167. <el-form-item label="半成品_成品_零头" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1168. <el-checkbox v-model="huanxingData.项目4"></el-checkbox>
  1169. </el-form-item>
  1170. </el-col>
  1171. </el-row>
  1172. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1173. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1174. <el-form-item label="操作台桌面_抽屉_地面" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1175. <el-checkbox v-model="huanxingData.项目5"></el-checkbox>
  1176. </el-form-item>
  1177. </el-col>
  1178. </el-row>
  1179. </el-descriptions-item>
  1180. <el-descriptions-item label="清场确认人" :span="9">
  1181. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1182. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1183. <el-form-item label="机长签字" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1184. <el-input v-model="huanxingData.机长" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1185. </el-form-item>
  1186. </el-col>
  1187. </el-row>
  1188. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  1189. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1190. <el-form-item label="带班主管签字" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1191. <el-input v-model="huanxingData.班长" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1192. </el-form-item>
  1193. </el-col>
  1194. <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
  1195. <el-form-item label="质量巡查员签字" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  1196. <el-input v-model="huanxingData.质量巡查员" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  1197. </el-form-item>
  1198. </el-col>
  1199. </el-row>
  1200. </el-descriptions-item>
  1201. </el-descriptions>
  1202. </div>
  1203. </el-tab-pane>
  1204. <el-tab-pane label="当前设备换型记录" @click="showTable('当前设备换型记录')" name="second">
  1205. <el-table
  1206. tooltip-effect="dark"
  1207. :data="huanxingselectData"
  1208. row-key="ID"
  1209. highlight-current-row="true"
  1210. :show-overflow-tooltip="true"
  1211. border @row-click="dianjianhandle"
  1212. style="width:115vh; height:50vh;"
  1213. @row-dblclick="handleSelectClick"
  1214. :row-class-name="rowClassName"
  1215. >
  1216. <el-table-column
  1217. prop="日期"
  1218. label="日期"
  1219. width="160"
  1220. />
  1221. <el-table-column
  1222. prop="机台编号"
  1223. label="机台编号"
  1224. width="90"
  1225. />
  1226. <el-table-column
  1227. prop="班组"
  1228. label="班组"
  1229. width="70"
  1230. />
  1231. <el-table-column
  1232. prop="工单编号A"
  1233. label="工单编号A"
  1234. width="95"
  1235. />
  1236. <el-table-column
  1237. prop="印件名称A"
  1238. label="印件名称A"
  1239. width="130"
  1240. />
  1241. <el-table-column
  1242. prop="印件工序A"
  1243. label="印件工序A"
  1244. width="150"
  1245. />
  1246. <el-table-column
  1247. prop="码包号A"
  1248. label="码包号A"
  1249. width="80"
  1250. />
  1251. <el-table-column
  1252. prop="工单编号B"
  1253. label="工单编号B"
  1254. width="100"
  1255. />
  1256. <el-table-column
  1257. prop="印件名称B"
  1258. label="印件名称B"
  1259. width="100"
  1260. />
  1261. <el-table-column
  1262. prop="印件工序B"
  1263. label="印件工序B"
  1264. width="150"
  1265. />
  1266. <el-table-column
  1267. prop="码包号B"
  1268. label="码包号B"
  1269. width="80"
  1270. />
  1271. <el-table-column
  1272. prop="清场项目A"
  1273. label="菲林_标样_签样品_留样品"
  1274. width="190"
  1275. />
  1276. <el-table-column
  1277. prop="清场项目B"
  1278. label="版材_纸张_电化铝_油墨"
  1279. width="190"
  1280. />
  1281. <el-table-column
  1282. prop="清场项目C"
  1283. label="过版纸_废品_次品"
  1284. width="170"
  1285. />
  1286. <el-table-column
  1287. prop="清场项目D"
  1288. label="半成品_成品_零头"
  1289. width="170"
  1290. />
  1291. <el-table-column
  1292. prop="清场项目E"
  1293. label="操作台桌面_抽屉_地面"
  1294. width="180"
  1295. />
  1296. <el-table-column
  1297. prop="机长"
  1298. label="机长"
  1299. width="80"
  1300. />
  1301. <el-table-column
  1302. prop="班长"
  1303. label="带班长"
  1304. width="80"
  1305. />
  1306. <el-table-column
  1307. prop="质量巡查员"
  1308. label="质量巡查员"
  1309. width="100"
  1310. />
  1311. <el-table-column
  1312. prop="创建时间"
  1313. label="创建时间"
  1314. width="120"
  1315. />
  1316. <el-table-column
  1317. prop="UNIQID"
  1318. label="UNIQID"
  1319. width="80"
  1320. />
  1321. </el-table>
  1322. </el-tab-pane>
  1323. </el-tabs>
  1324. </div>
  1325. </div>
  1326. </el-dialog>
  1327. <el-dialog
  1328. v-model="chanliangVisible"
  1329. destroy-on-close
  1330. width="60%"
  1331. style="height: 110vh;"
  1332. :before-close="closechanliangVisible"
  1333. :title="type2 === 'create' ? '新增' : '修改'"
  1334. >
  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.cpmc" 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-input v-model="formdata3.value.rq" id="日期" @keydown="ent1($event)" @blur="getJtbhsubmit()" :clearable="true" style="width: 100px;" /> -->
  1376. <el-date-picker
  1377. v-model="formdata3.value.rq"
  1378. type="datetime"
  1379. format="YYYY/MM/DD"
  1380. value-format="YYYY-MM-DD"
  1381. @keydown="ent1($event)"
  1382. />
  1383. </el-form-item>
  1384. </el-col>
  1385. <el-col :span="6">
  1386. <el-form-item label="机器:" prop="flatFeed" class="mab">
  1387. <el-input v-model="formdata3.value.sczl_jtbh" id="机器" @keydown="ent1($event)" @blur="getJtbhsubmit()" :clearable="true" style="width: 100px;" />
  1388. </el-form-item>
  1389. </el-col>
  1390. <el-col :span="7">
  1391. <el-form-item label="开工时间:" prop="flatFeed" class="mab">
  1392. <!-- <el-input v-model="formdata3.value.starttime" id="日期" @keydown="ent1($event)" @blur="getJtbhsubmit()" style="width: 100px;" /> -->
  1393. <!-- <el-date-picker
  1394. v-model="formdata3.value.starttime"
  1395. type="datetime"
  1396. format="YYYY/MM/DD hh:mm:ss"
  1397. value-format="YYYY-MM-DD h:m:s"
  1398. @keydown="ent1($event)"
  1399. /> -->
  1400. <el-date-picker
  1401. v-model="formdata3.value.starttime"
  1402. type="datetime"
  1403. placeholder="Pick a Date"
  1404. format="YYYY/MM/DD HH:mm:ss"
  1405. @keydown="ent1($event)"
  1406. />
  1407. </el-form-item>
  1408. </el-col>
  1409. <el-col :span="5" style="margin-top=0px; margin-bottom: 1px;">
  1410. <el-form-item label="流程单号" prop="id" style="margin-top=0px; margin-bottom: 1px;">
  1411. <el-input v-model="formdata3.value.num" id="流程单号" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1412. </el-form-item>
  1413. </el-col>
  1414. </el-row>
  1415. <el-row :gutter="24">
  1416. <el-col :span="9">
  1417. <el-form-item label="上机时间:" prop="flatFeed" class="mab">
  1418. <!-- <el-input v-model="formdata3.value.sj1" id="日期" @keydown="ent1($event)" :clearable="true" style="width: 170px;" /> -->
  1419. <el-date-picker
  1420. v-model="formdata3.value.sj1"
  1421. type="datetime"
  1422. format="YYYY/MM/DD hh:mm:ss"
  1423. value-format="YYYY-MM-DD h:m:s"
  1424. @keydown="ent1($event)"
  1425. />
  1426. </el-form-item>
  1427. </el-col>
  1428. <el-col :span="6">
  1429. <el-form-item label="下机时间:" prop="flatFeed" class="mab">
  1430. <!-- <el-input v-model="formdata3.value.sj2" id="机器" @keydown="ent1($event)" :clearable="true" style="width: 170px;" /> -->
  1431. <el-date-picker
  1432. v-model="formdata3.value.sj2"
  1433. type="datetime"
  1434. format="YYYY/MM/DD hh:mm:ss"
  1435. value-format="YYYY-MM-DD h:m:s"
  1436. @keydown="ent1($event)"
  1437. />
  1438. </el-form-item>
  1439. </el-col>
  1440. </el-row>
  1441. <el-row :gutter="24">
  1442. <el-col :span="6">
  1443. <el-form-item label="墨色:" prop="flatFeed" class="mab">
  1444. <el-input v-model="formdata3.value.色度数" id="墨色" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1445. </el-form-item>
  1446. </el-col>
  1447. <el-col :span="8">
  1448. <el-form-item label="加工联数:" prop="flatFeed" class="mab" >
  1449. <el-input v-model="formdata3.value.联数" id="加工联数" @keydown="ent1($event)" :clearable="true" style="width: 100px; margin-right: 30px;" />
  1450. </el-form-item>
  1451. </el-col>
  1452. <el-col :span="5">
  1453. <el-form-item label="产量:" prop="flatFeed" class="mab">
  1454. <el-input v-model="formdata3.value.产量" id="产量" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1455. </el-form-item>
  1456. </el-col>
  1457. <el-col :span="5">
  1458. <el-form-item label="制程废品:" prop="flatFeed" class="mab">
  1459. <el-input v-model="formdata3.value.制程废品" id="制程废品" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1460. </el-form-item>
  1461. </el-col>
  1462. </el-row>
  1463. <el-row :gutter="24">
  1464. <el-col :span="4">
  1465. <el-form-item label="制程次品:" prop="flatFeed" class="mab">
  1466. <el-input v-model="formdata3.value.制程次品" id="制程次品" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1467. </el-form-item>
  1468. </el-col>
  1469. <el-col :span="4">
  1470. <el-form-item label="前工序废:" prop="flatFeed" class="mab" >
  1471. <el-input v-model="formdata3.value.前工序废" id="前工序废" @keydown="ent1($event)" :clearable="true" style="width: 100px; margin-right: 30px;" />
  1472. </el-form-item>
  1473. </el-col>
  1474. <el-col :span="5">
  1475. <el-form-item label="来料异常:" prop="flatFeed" class="mab">
  1476. <el-input v-model="formdata3.value.来料异常" id="来料异常" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1477. </el-form-item>
  1478. </el-col>
  1479. <el-col :span="10">
  1480. <el-form-item label="换型类型:" prop="flatFeed" class="mab">
  1481. <el-input v-model="formdata3.value.换型类型" id="换型类型" disabled :clearable="true" style="width: 200px;" />
  1482. </el-form-item>
  1483. </el-col>
  1484. </el-row>
  1485. <el-row :gutter="30">
  1486. <el-col :span="5">
  1487. <el-form-item label="装版总工时:" prop="flatFeed" class="mab">
  1488. <el-input v-model="formdata3.value.装版工时" id="装版总工时" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1489. </el-form-item>
  1490. </el-col>
  1491. <el-col :span="5">
  1492. <el-form-item label="装版补产工时:" prop="flatFeed" class="mab" >
  1493. <el-input v-model="formdata3.value.装版补产工时" id="装版补产工时" @keydown="ent1($event)" :clearable="true" style="width: 100px; margin-right: 30px;" />
  1494. </el-form-item>
  1495. </el-col>
  1496. <el-col :span="5">
  1497. <el-form-item label="打样总工时:" prop="flatFeed" class="mab">
  1498. <el-input v-model="formdata3.value.打样工时" id="打样工时" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1499. </el-form-item>
  1500. </el-col>
  1501. <el-col :span="5">
  1502. <el-form-item label="打样补产工时:" prop="flatFeed" class="mab">
  1503. <el-input v-model="formdata3.value.打样补产工时" id="打样补产工时" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1504. </el-form-item>
  1505. </el-col>
  1506. <el-col :span="4">
  1507. <el-form-item label="保养工时:" prop="flatFeed" class="mab">
  1508. <el-input v-model="formdata3.value.保养工时" id="保养工时" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1509. </el-form-item>
  1510. </el-col>
  1511. </el-row>
  1512. <el-row :gutter="24">
  1513. <el-col :span="6">
  1514. <el-form-item label="异常总工时:" prop="flatFeed" class="mab">
  1515. <el-input v-model="formdata3.value.异常总工时" id="异常总工时" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1516. </el-form-item>
  1517. </el-col>
  1518. <el-col :span="8">
  1519. <el-form-item label="异常类型:" prop="flatFeed" class="mab">
  1520. <el-input v-model="formdata3.value.异常类型" disabled id="异常类型" :clearable="true" style="width: 100px;" />
  1521. </el-form-item>
  1522. </el-col>
  1523. <el-col :span="5" style="margin-top=0px; margin-bottom: 1px;">
  1524. <el-form-item label="异常补贴工时" prop="id" style="margin-top=0px; margin-bottom: 1px;">
  1525. <el-input v-model="formdata3.value.异常补时" id="异常补贴工时" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1526. </el-form-item>
  1527. </el-col>
  1528. </el-row>
  1529. <el-row :gutter="24">
  1530. <el-col :span="8">
  1531. <el-form-item label="通电时间:" prop="flatFeed" class="mab">
  1532. <el-input v-model="formdata3.value.通电工时" id="通电时间" @keydown="ent1($event)" :clearable="true" style="width: 100px;" />
  1533. </el-form-item>
  1534. </el-col>
  1535. <el-col :span="5" style="margin-top=0px; margin-bottom: 1px;">
  1536. <el-form-item label="定额代号" prop="id" style="margin-top=0px; margin-bottom: 1px;">
  1537. <el-input v-model="formdata3.value.dedh" id="定额代号" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1538. </el-form-item>
  1539. </el-col>
  1540. <el-col :span="3" style="margin-top=0px; margin-bottom: 1px;">
  1541. <el-form-item label="码包" prop="id" style="margin-top=0px; margin-bottom: 1px;">
  1542. <el-input v-model="formdata3.value.码包" id="码包" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent1($event)" placeholder="" />
  1543. </el-form-item>
  1544. </el-col>
  1545. </el-row>
  1546. <el-row :gutter="24">
  1547. <el-col :span="4">
  1548. <el-form-item label="码开始行:" prop="flatFeed" class="mab">
  1549. <el-input v-model="formdata3.value.码开始行" id="码开始行" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1550. </el-form-item>
  1551. </el-col>
  1552. <el-col :span="4">
  1553. <el-form-item label="码结束行:" prop="flatFeed" class="mab" >
  1554. <el-input v-model="formdata3.value.码结束行" id="码结束行" @keydown="ent1($event)" :clearable="true" style="width: 100px; margin-right: 30px;" />
  1555. </el-form-item>
  1556. </el-col>
  1557. <el-col :span="5">
  1558. <el-form-item label="主电表:" prop="flatFeed" class="mab">
  1559. <el-input v-model="formdata3.value.主电表" id="主电表" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1560. </el-form-item>
  1561. </el-col>
  1562. <el-col :span="10">
  1563. <el-form-item label="辅电表:" prop="flatFeed" class="mab">
  1564. <el-input v-model="formdata3.value.辅电表" id="辅电表" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1565. </el-form-item>
  1566. </el-col>
  1567. </el-row>
  1568. <div style="display: flex;">
  1569. <div style="width: 131vh;">组员及分配比例</div>
  1570. <div style="width: 13vh;">特殊组员</div>
  1571. <div>拉料人员</div>
  1572. </div>
  1573. <el-row :gutter="10" style="margin-top: 1vh;">
  1574. <el-col :span="2">
  1575. <el-input v-model="formdata3.value.bzdh" id="bzdh" @keydown="ent1($event)" placeholder="" />
  1576. </el-col>
  1577. <el-col :span="2">
  1578. <el-input v-model="formdata3.value.组员1['编号']" id="bh1" @keydown="ent($event, 'bzdh', 'bh1', 'bh2')" @keyup.enter.native="GetYg($event, '1')" placeholder="" />
  1579. </el-col>
  1580. <el-col :span="2">
  1581. <el-input v-model="formdata3.value.组员2['编号']" id="bh2" @keydown="ent($event, 'bh1', 'bh2', 'bh3')" @keyup.enter.native="GetYg($event, '2')" placeholder="" />
  1582. </el-col>
  1583. <el-col :span="2">
  1584. <el-input v-model="formdata3.value.组员3['编号']" id="bh3" @keydown="ent($event, 'bh2', 'bh3', 'bh4')" @keyup.enter.native="GetYg($event, '3')" placeholder="" />
  1585. </el-col>
  1586. <el-col :span="2">
  1587. <el-input v-model="formdata3.value.组员4['编号']" id="bh4" @keydown="ent($event, 'bh3', 'bh4', 'bh5')" @keyup.enter.native="GetYg($event, '4')" placeholder="" />
  1588. </el-col>
  1589. <el-col :span="2">
  1590. <el-input v-model="formdata3.value.组员5['编号']" id="bh5" @keydown="ent($event, 'bh4', 'bh5', 'bh6')" @keyup.enter.native="GetYg($event, '5')" placeholder="" />
  1591. </el-col>
  1592. <el-col :span="2">
  1593. <el-input v-model="formdata3.value.组员6['编号']" id="bh6" @keydown="ent($event, 'bh5', 'bh6', 'bh7')" @keyup.enter.native="GetYg($event, '6')" placeholder="" />
  1594. </el-col>
  1595. <el-col :span="2">
  1596. <el-input v-model="formdata3.value.组员7['编号']" id="bh7" @keydown="ent($event, 'bh6', 'bh7', 'bh8')" @keyup.enter.native="GetYg($event, '7')" placeholder="" />
  1597. </el-col>
  1598. <el-col :span="2">
  1599. <el-input v-model="formdata3.value.组员8['编号']" id="bh8" @keydown="ent($event, 'bh7', 'bh8', 'bh9')" @keyup.enter.native="GetYg($event, '8')" placeholder="" />
  1600. </el-col>
  1601. <el-col :span="2">
  1602. <el-input v-model="formdata3.value.组员9['编号']" id="bh9" @keydown="ent($event, 'bh8', 'bh9', 'bh10')" @keyup.enter.native="GetYg($event, '9')" placeholder="" />
  1603. </el-col>
  1604. <el-col :span="2">
  1605. <el-input v-model="formdata3.value.组员10['编号']" id="bh10" @keydown="ent($event, 'bh9', 'bh10', 'bh11')" @keyup.enter.native="GetYg($event, '10')" placeholder="" />
  1606. </el-col>
  1607. <el-col :span="2">
  1608. <el-input v-model="formdata3.value.拉料['编号']" id="bh11" @keydown="ent($event, 'bh10', 'bh11', 'rate1')" @keyup.enter.native="GetYg($event, '11')" placeholder="" />
  1609. </el-col>
  1610. </el-row>
  1611. <el-row :gutter="10" style="margin-top: 10px;">
  1612. <el-col :span="2">
  1613. </el-col>
  1614. <el-col :span="2">
  1615. <el-input v-model="formdata3.value.组员1['姓名']" id="name1" placeholder="" />
  1616. </el-col>
  1617. <el-col :span="2">
  1618. <el-input v-model="formdata3.value.组员2['姓名']" id="name2" placeholder="" />
  1619. </el-col>
  1620. <el-col :span="2">
  1621. <el-input v-model="formdata3.value.组员3['姓名']" id="name3" placeholder="" />
  1622. </el-col>
  1623. <el-col :span="2">
  1624. <el-input v-model="formdata3.value.组员4['姓名']" id="name4" placeholder="" />
  1625. </el-col>
  1626. <el-col :span="2">
  1627. <el-input v-model="formdata3.value.组员5['姓名']" id="name5" placeholder="" />
  1628. </el-col>
  1629. <el-col :span="2">
  1630. <el-input v-model="formdata3.value.组员6['姓名']" id="name6" placeholder="" />
  1631. </el-col>
  1632. <el-col :span="2">
  1633. <el-input v-model="formdata3.value.组员7['姓名']" id="name7" placeholder="" />
  1634. </el-col>
  1635. <el-col :span="2">
  1636. <el-input v-model="formdata3.value.组员8['姓名']" id="name8" placeholder="" />
  1637. </el-col>
  1638. <el-col :span="2">
  1639. <el-input v-model="formdata3.value.组员9['姓名']" id="name9" placeholder="" />
  1640. </el-col>
  1641. <el-col :span="2">
  1642. <el-input v-model="formdata3.value.组员10['姓名']" id="name10" placeholder="" />
  1643. </el-col>
  1644. <el-col :span="2">
  1645. <el-input v-model="formdata3.value.拉料['姓名']" id="name11" placeholder="" />
  1646. </el-col>
  1647. </el-row>
  1648. <el-row :gutter="10" style="margin-top: 10px;">
  1649. <el-col :span="2">
  1650. </el-col>
  1651. <el-col :span="2">
  1652. <el-input v-model="formdata3.value.组员1['比例']" id="rate1" @keydown="ent($event, 'bh11', 'rate1', 'rate2')" placeholder="" />
  1653. </el-col>
  1654. <el-col :span="2">
  1655. <el-input v-model="formdata3.value.组员2['比例']" id="rate2" @keydown="ent($event, 'rate1', 'rate2', 'rate3')" placeholder="" />
  1656. </el-col>
  1657. <el-col :span="2">
  1658. <el-input v-model="formdata3.value.组员3['比例']" id="rate3" @keydown="ent($event, 'rate2', 'rate3', 'rate4')" placeholder="" />
  1659. </el-col>
  1660. <el-col :span="2">
  1661. <el-input v-model="formdata3.value.组员4['比例']" id="rate4" @keydown="ent($event, 'rate3', 'rate4', 'rate5')" placeholder="" />
  1662. </el-col>
  1663. <el-col :span="2">
  1664. <el-input v-model="formdata3.value.组员5['比例']" id="rate5" @keydown="ent($event, 'rate4', 'rate5', 'rate6')" placeholder="" />
  1665. </el-col>
  1666. <el-col :span="2">
  1667. <el-input v-model="formdata3.value.组员6['比例']" id="rate6" @keydown="ent($event, 'rate5', 'rate6', 'rate7')" placeholder="" />
  1668. </el-col>
  1669. <el-col :span="2">
  1670. <el-input v-model="formdata3.value.组员7['比例']" id="rate7" @keydown="ent($event, 'rate6', 'rate7', 'rate8')" placeholder="" />
  1671. </el-col>
  1672. <el-col :span="2">
  1673. <el-input v-model="formdata3.value.组员8['比例']" id="rate8" @keydown="ent($event, 'rate7', 'rate8', 'rate9')" placeholder="" />
  1674. </el-col>
  1675. <el-col :span="2">
  1676. <el-input v-model="formdata3.value.组员9['比例']" id="rate9" @keydown="ent($event, 'rate8', 'rate9', 'rate10')" placeholder="" />
  1677. </el-col>
  1678. <el-col :span="2">
  1679. <el-input v-model="formdata3.value.组员10['比例']" id="rate10" @keydown="ent($event, 'rate9', 'rate10', '工单编号')" placeholder="" />
  1680. </el-col>
  1681. <el-col :span="2">
  1682. </el-col>
  1683. </el-row>
  1684. <!-- </el-scrollbar> -->
  1685. <template #footer>
  1686. <div class="dialog-footer">
  1687. <el-button @click="closeDialog">取 消</el-button>
  1688. <el-button type="primary" @click="chanliangenterDialog">确 定</el-button>
  1689. </div>
  1690. </template>
  1691. </el-dialog>
  1692. <el-dialog v-model="MachineVisible" :before-close="closeMachineVisible" :title="type === '0' ? '新增' : '机台状态显示'"
  1693. destroy-on-close width="80%" style="height: 100%;">
  1694. <div class="button-container">
  1695. <button v-for="(item, index) in machineData" :key="index" class="custom-button" @click="handleButtonClick(item.设备编号)">
  1696. <img :src="`/src/assets/${item.状态}.png`" :alt="altText" style="max-width: 100%; height: auto;"/>
  1697. <span style="margin-top: 8px;">{{ item.设备编号 + ' - ' + item.设备名称 }}</span>
  1698. </button>
  1699. </div>
  1700. </el-dialog>
  1701. <el-dialog v-model="hesuanVisible" :before-close="closehesuanVisible" title="核算参数调整" destroy-on-close width="20%" style="height: 50%;">
  1702. <div style="display: flex; align-items: center;">
  1703. <label>参数类型:</label>
  1704. <el-radio v-model="selectedOption" label="难度调整系数"></el-radio>
  1705. </div>
  1706. <div style="margin-top: 10px;margin-left: 70px;">
  1707. <el-radio v-model="selectedOption" label="凹印版距"></el-radio>
  1708. </div>
  1709. <div style="margin-top: 10px;margin-left: 70px;">
  1710. <el-radio v-model="selectedOption" label="色度数"></el-radio>
  1711. </div>
  1712. <div style="margin-left: 70px;">
  1713. <el-col :span="15">
  1714. <el-form-item label="缩放系数:" prop="flatFeed" class="mab">
  1715. <el-input v-model="formData.工单编号" id="辅电表" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1716. </el-form-item>
  1717. <el-form-item label="产品板距:" prop="flatFeed" class="mab">
  1718. <el-input v-model="formData.工单编号" id="辅电表" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1719. </el-form-item>
  1720. <el-form-item label="印刷方式:" prop="flatFeed" class="mab">
  1721. <el-input v-model="formData.工单编号" id="辅电表" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1722. </el-form-item>
  1723. <el-form-item label="色度数 :" prop="flatFeed" class="mab">
  1724. <el-input v-model="formData.工单编号" id="辅电表" @keydown="ent1($event)" :clearable="true" style="width: 200px;" />
  1725. </el-form-item>
  1726. </el-col>
  1727. </div>
  1728. </el-dialog>
  1729. <Shebeizhuangtai
  1730. v-if="dialogSbyxgl"
  1731. v-model="dialogSbyxgl"
  1732. :title="titinfo"
  1733. :formData="formData"
  1734. />
  1735. </el-main>
  1736. </el-container>
  1737. </el-container>
  1738. </div>
  1739. </template>
  1740. <script setup>
  1741. import {
  1742. createCompany,
  1743. deleteCompany,
  1744. deleteCompanyByIds,
  1745. updateCompany,
  1746. findCompany,
  1747. getCompanyList
  1748. } from '@/api/company'
  1749. import {
  1750. EquipmentSchedulingEdit,
  1751. teamDel
  1752. } from "@/api/yunyin/yunying";
  1753. import {
  1754. facilityTab,
  1755. facilitychanLiang,
  1756. facilityInspect,
  1757. facilityProduction,
  1758. facilityTeam,
  1759. facilityMachineList,
  1760. facilitySpotCheckItem,
  1761. facilityInspectionItem,
  1762. reportProduceInfo,
  1763. reportName,
  1764. reportInfo,
  1765. reportMachineMac,
  1766. facilityWorklist,
  1767. setProcessStatus,
  1768. submitDailyProduction,
  1769. facilityDetail,
  1770. inspectionRecord,
  1771. getYg,
  1772. facilityProcedure,
  1773. facilityPrintGetTab,
  1774. facilityPrintDetail,
  1775. ProcessInspectionRecordsItem,
  1776. MachineDetailList,
  1777. ComplaintRecord,
  1778. remodelGetTab,
  1779. ModelChangeRecord,
  1780. MachineChanliangDetail,
  1781. chanliangEdit,
  1782. productionGdmc,
  1783. productionYjmc,
  1784. ChanliangDel,
  1785. ChanliangAdd,
  1786. MachineChanliangDetailEdit,
  1787. ChanliangWorkorder,
  1788. ChanliangPrintDetail,
  1789. ChanliangProcessDetail,
  1790. EmployeeData,
  1791. RemodelDetail,
  1792. AdditionalInspectionRecordAdd,
  1793. ProcessInspectionRecordsItemAdd
  1794. } from '@/api/jixiaoguanli/jitairibaobiao'
  1795. import {
  1796. MachineTeamAdd,
  1797. setMachineTeam,
  1798. } from '@/api/jixiaoguanli/baogong'
  1799. import {
  1800. FieldInspectionRecord
  1801. } from "@/api/mes/job";
  1802. import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue'
  1803. // 全量引入格式化工具 请按需保留
  1804. import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
  1805. import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
  1806. import { ElMessage, ElMessageBox } from 'element-plus'
  1807. import { ref, reactive } from 'vue'
  1808. import { useUserStore } from '@/pinia/modules/user'
  1809. const userStore = useUserStore()
  1810. const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
  1811. defineOptions({
  1812. name: 'Company'
  1813. })
  1814. const DelType = ref(false)
  1815. const AddType = ref(false)
  1816. const gytableData = ref([])
  1817. const drzcDatas =ref([])
  1818. const detailData = reactive([])
  1819. const treeData=ref([])
  1820. const yinbantreeData=ref([])
  1821. let dianjiantreeData;
  1822. let JTMC=ref()
  1823. let date=ref()
  1824. let titinfo=ref()
  1825. let JTMCOn=ref()
  1826. let showbutton=ref()
  1827. let dateOn=ref()
  1828. const activName = ref('first')
  1829. let productCode=ref()
  1830. const sbzyData = reactive([])
  1831. const FPData = reactive([])
  1832. const CLMXData = reactive([])
  1833. let JYData = reactive([])
  1834. const selectData = ref([])
  1835. const handleNodeClick = (nodeData,node) => {
  1836. //存放当前节点的nodeId
  1837. if (nodeData.level === 1) {
  1838. console.log(node.label); // 第一级节点
  1839. CJMC.value=node.label
  1840. showbutton.value=true
  1841. JTMCOn.value=false
  1842. dateOn.value=false
  1843. MachinelList()
  1844. DelType.value = false
  1845. AddType.value = false
  1846. // MachineVisible.value=true
  1847. } else if (nodeData.level === 2) {
  1848. console.log(node.label); // 第二级节点
  1849. JTMC=node.label.split("-")[0]
  1850. JTMCOn.value=true
  1851. dateOn.value=false
  1852. showbutton.value=false
  1853. FacilityProduction()
  1854. FacilityWorklist()
  1855. // FacilityTeam(JTMC)
  1856. // console.log('123')
  1857. // console.log(JTMC)
  1858. DelType.value = false
  1859. AddType.value = false
  1860. } else if (nodeData.level === 3) {
  1861. JTMC=nodeData.machineName.split("-")[0]
  1862. JTMCOn.value=false
  1863. dateOn.value=true
  1864. date=node.label
  1865. gytableData.value=[]
  1866. drzcDatas.value=[]
  1867. columnNames=[]
  1868. drzcData=[]
  1869. showbutton.value=false
  1870. FacilityInspect()
  1871. FacilitychanLiang()
  1872. DelType.value = true
  1873. AddType.value = true
  1874. // FacilityTeam(JTMC)
  1875. // InspectionRecord()
  1876. // FacilityDetail()
  1877. console.log(node.label); // 第三级节点
  1878. }
  1879. }
  1880. const hesuanVisible = ref(false)
  1881. const MachineVisible = ref(false)
  1882. const machineData = reactive([])
  1883. const MachinelList = async () => {
  1884. const response = await MachineDetailList({workshop:CJMC.value});
  1885. if (response.code === 0) {
  1886. machineData.splice(0, machineData.length, ...response.data);
  1887. console.log(machineData)
  1888. // return require(`@/assets/${machineData.状态}.png`);
  1889. // MachineVisible.value=true
  1890. }
  1891. }
  1892. //设置机台状态
  1893. function handleButtonClick(deviceId) {
  1894. console.log(deviceId);
  1895. MachineVisible.value=false
  1896. // dialogSbyxgl.value=true
  1897. JTMC=deviceId.split("-")[0]
  1898. // JTMCOn.value=true
  1899. // dateOn.value=false
  1900. console.log(JTMC)
  1901. GetdialogSbyxgl()
  1902. // GetdialogSbyxgl(deviceId)
  1903. }
  1904. const GetdialogSbyxgl = async () => {
  1905. const response = await facilityProduction({machine:JTMC});
  1906. if (response.code === 0) {
  1907. console.log(response)
  1908. // 填充formData对象的基本字段
  1909. // formData.value.工单编号 = response.data.工单编号;
  1910. // formData.value.印件编号 = response.data.印件号;
  1911. // formData.value.工序名称 = response.data.工序名称;
  1912. // formData.value.产品名称 = response.data.产品名称;
  1913. // formData.value.班组 = response.data.班组编号;
  1914. formData.value.工单编号 = response.data.工单编号;
  1915. formData.value.印件号 = response.data.印件号;
  1916. formData.value.工序号 = response.data.工序名称.substring(0,2);
  1917. formData.value.工序名称 = response.data.工序名称;
  1918. formData.value.产品名称 = response.data.产品名称;
  1919. formData.value.班组Id=response.data.班组Id
  1920. formData.value.machine=JTMC
  1921. formData.value.状态=response.data.状态
  1922. let time = new Date();
  1923. time.setDate(time.getDate() - 0); // 今天的前N天的日期,N自定义
  1924. titinfo = `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}`;
  1925. titinfo+='【'+JTMC+response.data.工单编号+response.data.产品名称+'】'+response.data.工序名称
  1926. let sczl_bhkey=''
  1927. let sczl_namekey=''
  1928. if (response.data.班组成员) {
  1929. for (let i = 0; i < Math.min(Object.keys(response.data.班组成员).length, 6); i++) {
  1930. sczl_bhkey=`sczl_bh${i+1}`
  1931. sczl_namekey=`sczl_name${i+1}`
  1932. formData.value[sczl_bhkey] = response.data.班组成员[i]['编号'];
  1933. formData.value[sczl_namekey] = response.data.班组成员[i]['姓名'];
  1934. console.log(response.data.班组成员[i]['编号'])
  1935. classbz.value[i]=response.data.班组成员[i]['编号']
  1936. }
  1937. }
  1938. formData.value.class=classbz.value.join(',')
  1939. console.log(formData.value.class)
  1940. formData.value.JTMC=JTMC
  1941. const responses = await MachineDetailList({workshop:'胶印车间'});
  1942. if(responses.code===0){
  1943. responses.data.map(item=>{
  1944. if(item.设备编号==JTMC){
  1945. formData.value.status=item.状态
  1946. }
  1947. })
  1948. }
  1949. // console.log(formData.value.工单编号)
  1950. }
  1951. FacilityWorklist()
  1952. onstatus()
  1953. }
  1954. // const getImagePath = async (machineData.状态) => {
  1955. // return require(`@/assets/${status}.png`);
  1956. // }
  1957. const classbz=ref([])
  1958. const GDBH=ref()
  1959. //当前生产订单
  1960. const FacilityProduction = async () => {
  1961. const response = await facilityProduction({machine:JTMC});
  1962. if (response.code === 0) {
  1963. console.log(response)
  1964. // 填充formData对象的基本字段
  1965. // formData.value.工单编号 = response.data.工单编号;
  1966. // formData.value.印件编号 = response.data.印件号;
  1967. // formData.value.工序名称 = response.data.工序名称;
  1968. // formData.value.产品名称 = response.data.产品名称;
  1969. // formData.value.班组 = response.data.班组编号;
  1970. formData.value.工单编号 = response.data.工单编号;
  1971. formData.value.印件号 = response.data.印件号;
  1972. formData.value.工序号 = response.data.工序名称.substring(0,2);
  1973. formData.value.工序名称 = response.data.工序名称;
  1974. formData.value.产品名称 = response.data.产品名称;
  1975. formData.value.班组Id=response.data.班组Id
  1976. formData.value.machine=JTMC
  1977. formData.value.状态=response.data.状态
  1978. let sczl_bhkey=''
  1979. let sczl_namekey=''
  1980. if (response.data.班组成员) {
  1981. for (let i = 0; i < Math.min(Object.keys(response.data.班组成员).length, 6); i++) {
  1982. sczl_bhkey=`sczl_bh${i+1}`
  1983. sczl_namekey=`sczl_name${i+1}`
  1984. formData.value[sczl_bhkey] = response.data.班组成员[i]['编号'];
  1985. formData.value[sczl_namekey] = response.data.班组成员[i]['姓名'];
  1986. console.log(response.data.班组成员[i]['编号'])
  1987. classbz.value[i]=response.data.班组成员[i]['编号']
  1988. }
  1989. }
  1990. formData.value.class=classbz.value.join(',')
  1991. console.log(formData.value.class)
  1992. formData.value.JTMC=JTMC
  1993. const responses = await MachineDetailList({workshop:'胶印车间'});
  1994. if(responses.code===0){
  1995. responses.data.map(item=>{
  1996. if(item.设备编号==JTMC){
  1997. formData.value.status=item.状态
  1998. }
  1999. })
  2000. }
  2001. // console.log(formData.value.工单编号)
  2002. }
  2003. // getTableData()
  2004. }
  2005. let CJMC=ref()
  2006. //设备工作清单
  2007. const FacilityWorklist = async () => {
  2008. const response = await facilityWorklist({machine:JTMC});
  2009. if (response.code === 0) {
  2010. console.log(response)
  2011. sbzyData.splice(0, sbzyData.length, ...response.data);
  2012. const res = await facilityProcedure({ Gd_gdbh: sbzyData[0]['工单编号|质量信息'].substring(0, 7) })
  2013. formData.value.productCode= response.data[0]['产品代号']
  2014. console.log(res)
  2015. if (res.code === 0) {
  2016. selectData.value = res.data
  2017. }
  2018. console.log('22222222')
  2019. FacilityTeam(JTMC)
  2020. }
  2021. }
  2022. //检验记录
  2023. const InspectionRecord = async () => {
  2024. console.log(formData.value.班组)
  2025. const response = await inspectionRecord({machine:JTMC,Gd_gdbh:formData.value.工单编号,team:BZMC.value});
  2026. // const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2311114',team:'A班'});
  2027. // const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2312191',team:'A班'});
  2028. console.log(response)
  2029. if(response.code==0){
  2030. // 提取 inspectiontime 作为列名
  2031. // Extract inspectiontime as columnNames
  2032. columnNames = response.data.inspectiontime;
  2033. // Populate drzcData with row data
  2034. for (const key in response.data) {
  2035. if (key !== 'inspectiontime') {
  2036. const item = response.data[key];
  2037. const rowData = {
  2038. '工单编号': item['工单编号'],
  2039. '印件号': item['印件号'],
  2040. '工序名称': item['工序名称'],
  2041. '检验项目': item['检验项目']
  2042. };
  2043. // Initialize time columns with '—'
  2044. columnNames.forEach(time => {
  2045. rowData[time] = '';
  2046. });
  2047. // Split inspectresult and fill the corresponding time columns
  2048. const results = item['inspectresult'].split(',');
  2049. results.forEach(result => {
  2050. if (columnNames.includes(result)) {
  2051. rowData[result] = '√';
  2052. }else{rowData[result] = ''}
  2053. });
  2054. // Add the row data to drzcData
  2055. JYData.push(rowData);
  2056. }
  2057. }
  2058. console.log(JYData);
  2059. }
  2060. }
  2061. //当班产量明细
  2062. const FacilityDetail = async () => {
  2063. console.log('123123')
  2064. console.log(JTMC)
  2065. console.log('123123')
  2066. console.log(formData.value.工单编号)
  2067. console.log('123123')
  2068. console.log(formData.value.班组)
  2069. formData.value.production_now=0
  2070. formData.value.production_all=0
  2071. // const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team: formData.value.班组 });
  2072. const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team: BZMC.value });
  2073. // const response = await facilityDetail({ machine: JTMC, Gd_gdbh: '2311114', team:'A班' });
  2074. if (response.code === 0) {
  2075. console.log('123123')
  2076. console.log(response);
  2077. CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
  2078. formData.value.production_now=response.data[0].产量
  2079. formData.value.production_all=response.data.total.产量
  2080. }
  2081. };
  2082. // 验证规则
  2083. const rule = reactive({
  2084. })
  2085. const searchRule = reactive({
  2086. createdAt: [
  2087. { validator: (rule, value, callback) => {
  2088. if (searchInfo.value.startCreatedAt && !searchInfo.value.endCreatedAt) {
  2089. callback(new Error('请填写结束日期'))
  2090. } else if (!searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt) {
  2091. callback(new Error('请填写开始日期'))
  2092. } else if (searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt && (searchInfo.value.startCreatedAt.getTime() === searchInfo.value.endCreatedAt.getTime() || searchInfo.value.startCreatedAt.getTime() > searchInfo.value.endCreatedAt.getTime())) {
  2093. callback(new Error('开始日期应当早于结束日期'))
  2094. } else {
  2095. callback()
  2096. }
  2097. }, trigger: 'change' }
  2098. ],
  2099. })
  2100. const elFormRef = ref()
  2101. const elSearchFormRef = ref()
  2102. // =========== 表格控制部分 ===========
  2103. const page = ref(1)
  2104. const total = ref(0)
  2105. const pageSize = ref(10)
  2106. const tableData = ref([])
  2107. const searchInfo = ref({})
  2108. const xunchaVisible = ref(false)
  2109. const xunchatreeData=ref([{label: '现场巡查记录',} ])
  2110. // 重置
  2111. const onReset = () => {
  2112. searchInfo.value = {}
  2113. getTableData()
  2114. }
  2115. // 搜索
  2116. const onSubmit = () => {
  2117. elSearchFormRef.value?.validate(async(valid) => {
  2118. if (!valid) return
  2119. page.value = 1
  2120. pageSize.value = 10
  2121. getTableData()
  2122. })
  2123. }
  2124. // 分页
  2125. const handleSizeChange = (val) => {
  2126. pageSize.value = val
  2127. getTableData()
  2128. }
  2129. // 修改页面容量
  2130. const handleCurrentChange = (val) => {
  2131. page.value = val
  2132. getTableData()
  2133. }
  2134. const getTableData = async () => {
  2135. const response = await facilityTab();
  2136. if (response.code === 0 && response.data) {
  2137. const workshops = response.data; // 车间数据
  2138. // 在推送新项之前将 treeData 重置为空数组
  2139. treeData.value = []; // 使用 .value 访问响应式引用的值
  2140. for (const workshopName in workshops) {
  2141. const workshopNode = {
  2142. label: workshopName,
  2143. children: [],
  2144. level: 1 // 添加层级属性
  2145. };
  2146. const machines = workshops[workshopName]; // 车间下的机器
  2147. for (const machineName in machines) {
  2148. const machineNode = {
  2149. label: machineName,
  2150. children: [],
  2151. level: 2, // 添加层级属性
  2152. parentNode: workshopNode
  2153. };
  2154. // Now that machineNode is initialized, you can refer to it
  2155. const childrenNodes = machines[machineName].map(dateTime => {
  2156. const dateOnly = dateTime.split(' ')[0];
  2157. return {
  2158. label: dateOnly,
  2159. machineName:machineName,
  2160. level: 3, // 添加层级属性
  2161. parentNode: machineNode
  2162. };
  2163. });
  2164. // Assign the childrenNodes to the machineNode's children property
  2165. machineNode.children = childrenNodes;
  2166. // Finally, push the machineNode to the workshopNode's children array
  2167. workshopNode.children.push(machineNode);
  2168. }
  2169. // 将 workshopNode 推送到响应式 treeData 数组
  2170. treeData.value.push(workshopNode);
  2171. }
  2172. }
  2173. };
  2174. // 查询
  2175. const getTableList = async() => {
  2176. const table = await getCompanyList({ page: page.value, pageSize: pageSize.value, ...searchInfo.value })
  2177. if (table.code === 0) {
  2178. tableData.value = table.data.list
  2179. total.value = table.data.total
  2180. page.value = table.data.page
  2181. pageSize.value = table.data.pageSize
  2182. }
  2183. }
  2184. getTableData()
  2185. const type2 = ref('')
  2186. //新增
  2187. function onADD(){
  2188. type2.value="create"
  2189. MachineChanliang(uid.value)
  2190. }
  2191. //删除
  2192. function onDel() {
  2193. Chanliangdel()
  2194. }
  2195. // 日产量上报删除
  2196. const Chanliangdel = async() => {
  2197. const res = await ChanliangDel({ UniqId:uid.value})
  2198. if (res.code === 0) {
  2199. ElMessage({
  2200. type: 'success',
  2201. message: '成功'
  2202. })
  2203. FacilitychanLiang()
  2204. }else{
  2205. ElMessage({
  2206. type: 'error',
  2207. message: '失败'
  2208. })
  2209. }
  2210. }
  2211. //核算调整
  2212. function hesuan(){
  2213. hesuanVisible.value=true
  2214. }
  2215. //制程检验
  2216. const zhichengstatus=ref(false)
  2217. const xunchaData = ref([]);
  2218. const zhichengVisible = ref(false)
  2219. const zhichengtreeData=ref([{
  2220. label: '首件与过程确认'
  2221. },{
  2222. label: '机台检验'
  2223. },{
  2224. label: 'IPQC检验'
  2225. }])
  2226. const onzhicheng = async () => {
  2227. zhichengstatus.value=false
  2228. xunchaData.value=[]
  2229. const response = await reportProduceInfo({machine:JTMC.split("#")[0]});
  2230. if (response.code === 0) {
  2231. xunchaData.value.order=response.data.order
  2232. xunchaData.value.yjno=response.data.yjno
  2233. xunchaData.value.product_name=response.data.product_name
  2234. xunchaData.value.gxmc=response.data.gxmc
  2235. xunchaData.value.lcdh=0
  2236. xunchaData.value.sczl_bh=''
  2237. xunchaData.value.sczl_name=''
  2238. xunchaData.value.remark=''
  2239. zhichengVisible.value = true;
  2240. }
  2241. }
  2242. const category =ref()
  2243. const zhibiaoselectData=ref([])
  2244. const fujiaselectData=ref([])
  2245. const zhichengNodeClick = (node, check) => {
  2246. if(node.label){
  2247. zhichengstatus.value=true
  2248. category.value=node.label
  2249. processInspectionRecordsItem()
  2250. }
  2251. };
  2252. const processInspectionRecordsItem = async (value) => {
  2253. const response = await ProcessInspectionRecordsItem({ process: xunchaData.value.gxmc });
  2254. if (response.code === 0) {
  2255. zhibiaoselectData.value=response.data.首件.指标检验.map(item=>{
  2256. item.notjc=true;
  2257. item.zc=false;
  2258. item.yc=false;
  2259. item.remark=''
  2260. item.category=category.value
  2261. item.workOrder=xunchaData.value.order
  2262. item.yjno=xunchaData.value.yjno
  2263. item.flow=xunchaData.value.lcdh
  2264. item.team=BZMC.value
  2265. item.machine=JTMC.split("#")[0]
  2266. item.selected = '不检测';
  2267. return item
  2268. })
  2269. fujiaselectData.value=response.data.首件.附加.map(item=>{
  2270. item.notjc=true;
  2271. item.workOrder=xunchaData.value.order
  2272. item.yjno=xunchaData.value.yjno
  2273. item.flow=xunchaData.value.lcdh
  2274. item.machine=JTMC.split("#")[0]
  2275. return item
  2276. })
  2277. }
  2278. };
  2279. const zhichengDialog = async () => {
  2280. console.log(fujiaselectData.value)
  2281. let arr =[]
  2282. zhibiaoselectData.value.map(item=>{
  2283. if(item.zc==true){
  2284. item.result='合格'
  2285. item.item=item.检验项目
  2286. item.instrument=item.检测方法
  2287. item.standard=item.相关标准
  2288. delete item.notjc
  2289. delete item.zc
  2290. delete item.yc
  2291. delete item.检验项目
  2292. delete item.检测方法
  2293. delete item.相关标准
  2294. delete item.检验频率
  2295. arr.push(item)
  2296. return item
  2297. }
  2298. if(item.yc==true){
  2299. item.result='不合格'
  2300. item.item=item.检验项目
  2301. item.instrument=item.检测方法
  2302. item.standard=item.相关标准
  2303. delete item.notjc
  2304. delete item.zc
  2305. delete item.yc
  2306. delete item.检验项目
  2307. delete item.检测方法
  2308. delete item.相关标准
  2309. delete item.检验频率
  2310. arr.push(item)
  2311. return item
  2312. }
  2313. if(item.notjc==true){
  2314. item.result='不检测'
  2315. item.item=item.检验项目
  2316. item.instrument=item.检测方法
  2317. item.standard=item.相关标准
  2318. delete item.notjc
  2319. delete item.zc
  2320. delete item.yc
  2321. delete item.检验项目
  2322. delete item.检测方法
  2323. delete item.相关标准
  2324. delete item.检验频率
  2325. // arr.push(item)
  2326. return item
  2327. }
  2328. })
  2329. let arrs=[]
  2330. let fujiastatus=0
  2331. fujiaselectData.value.map(item=>{
  2332. if(item.notjc==true){
  2333. return item
  2334. }else{
  2335. fujiastatus=1
  2336. item.remark=item.缺陷备注
  2337. delete item.notjc
  2338. delete item.缺陷备注
  2339. delete item.编号
  2340. arrs.push(item)
  2341. return item
  2342. }
  2343. })
  2344. if(fujiastatus==1){
  2345. const responses = await AdditionalInspectionRecordAdd(arrs);
  2346. fujiastatus=0
  2347. }
  2348. // const response = await ProcessInspectionRecordsItemAdd(arr);
  2349. const response = await ProcessInspectionRecordsItemAdd(zhibiaoselectData.value);
  2350. // const responses = await AdditionalInspectionRecordAdd(zhibiaoselectData.value);
  2351. if (response.code === 0) {
  2352. ElMessage({
  2353. type: 'success',
  2354. message: '成功'
  2355. })
  2356. zhichengVisible.value=false
  2357. zhibiaoselectData.value=[]
  2358. fujiaselectData.value=[]
  2359. }
  2360. }
  2361. const closezhichengDialog = async () => {
  2362. zhichengVisible.value=false
  2363. }
  2364. //设置机台状态
  2365. const dialogSbyxgl=ref(false)
  2366. function onstatus() {
  2367. dialogSbyxgl.value=true
  2368. SetMachineStatus()
  2369. // ReportProduceInfo()
  2370. }
  2371. //设置机台状态
  2372. const SetMachineStatus = async () => {
  2373. // const response = await setMachineStatus({
  2374. // machine:'JY03',
  2375. // gy_name:'02-胶印〖白、黑、哑油【预干】、NT光油',
  2376. // order:'2311114',
  2377. // yjno:'1',
  2378. // class:'ZM00545,ZM01351,ZM01170',
  2379. // status:'维修',
  2380. // production_now:'',
  2381. // production_all:'',
  2382. // });
  2383. // if (response.code === 0) {
  2384. // }
  2385. }
  2386. //客诉记录
  2387. const complaintsShow = ref(false)
  2388. const complaintsData = reactive([])
  2389. function oncomplaints() {
  2390. Complaints()
  2391. }
  2392. // 客诉记录表格填充
  2393. const Complaints = async() => {
  2394. // console.log(sbzyData[0].产品代号)
  2395. // console.log(sbzyData[0].产品代号)
  2396. // console.log(sbzyData[0].产品代号)
  2397. // const res = await ComplaintRecord({productCode :cpcode.value})
  2398. if(finishedcode.value==null){
  2399. ElMessage({
  2400. type: 'error',
  2401. message: '请先选择产品',
  2402. })
  2403. return
  2404. }
  2405. const res = await ComplaintRecord({productCode :finishedcode.value})
  2406. if (res.code === 0) {
  2407. if(res.data==null){
  2408. ElMessage({
  2409. type: 'error',
  2410. message: '此产品暂无客诉记录',
  2411. })
  2412. }else{
  2413. complaintsData.splice(0, complaintsData.length, ...res.data);
  2414. console.log(complaintsData);
  2415. console.log(complaintsData[0].产品编号)
  2416. selectedRowData.value=complaintsData[0]
  2417. console.log(selectedRowData)
  2418. complaintsShow.value=true
  2419. }
  2420. }
  2421. }
  2422. const selectedRowData = ref({
  2423. })
  2424. //客诉表格单击
  2425. const complaintshandle = (val, row) => {
  2426. console.log(val)
  2427. selectedRowData.value=val
  2428. };
  2429. //换型清场
  2430. const huanxingVisible = ref(false)
  2431. const huanxingtreeData=ref([])
  2432. const huanxingselectData = ref([])
  2433. const huanxingstatus=ref(false)
  2434. const activNames=ref('first')
  2435. function onClear() {
  2436. huanxingVisible.value=true
  2437. RemodelGetTab()
  2438. }
  2439. function onClear2() {
  2440. console.log(formData.value.工单编号)
  2441. console.log(BZMC)
  2442. }
  2443. const RemodelGetTab = async() => {
  2444. const response = await remodelGetTab()
  2445. let arr=[]
  2446. if (response.code === 0) {
  2447. for(let key in response.data){
  2448. if(response.data[key][0]){
  2449. let children =[]
  2450. for (let i = 0; i < response.data[key].length; i++) {
  2451. children.push({label:response.data[key][i],machine:key})
  2452. }
  2453. arr.push({
  2454. label:key,
  2455. children:children
  2456. })
  2457. console.log(response.data[key].length)
  2458. }else{
  2459. arr.push({label:key})
  2460. }
  2461. }
  2462. huanxingtreeData.value=arr
  2463. }else{
  2464. ElMessage({
  2465. type: 'error',
  2466. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  2467. })
  2468. }
  2469. }
  2470. const huanxingNodeClick = (node) => {
  2471. //存放当前节点的nodeId
  2472. //存放当前节点的nodeId
  2473. if(node.machine){
  2474. // console.log(node.label.split('/')[1])
  2475. huanxingstatus.value=true
  2476. remodelDetail(node.label.split('/')[1])
  2477. modelChangeRecord(node.machine)
  2478. }else{
  2479. console.log('2')
  2480. }
  2481. }
  2482. const huanxingData = ref({})
  2483. const remodelDetail = async (val) => {
  2484. const response = await RemodelDetail({UniqId:val});
  2485. if (response.code === 0) {
  2486. huanxingData.value=response.data
  2487. if(response.data.项目1==1){
  2488. huanxingData.value.项目1=true
  2489. }else{
  2490. huanxingData.value.项目1=false
  2491. }
  2492. if(response.data.项目2==1){
  2493. huanxingData.value.项目2=true
  2494. }else{
  2495. huanxingData.value.项目2=false
  2496. }
  2497. if(response.data.项目3==1){
  2498. huanxingData.value.项目3=true
  2499. }else{
  2500. huanxingData.value.项目3=false
  2501. }
  2502. if(response.data.项目4==1){
  2503. huanxingData.value.项目4=true
  2504. }else{
  2505. huanxingData.value.项目4=false
  2506. }
  2507. if(response.data.项目5==1){
  2508. huanxingData.value.项目5=true
  2509. }else{
  2510. huanxingData.value.项目5=false
  2511. }
  2512. }else{
  2513. ElMessage({
  2514. type: 'error',
  2515. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  2516. })
  2517. }
  2518. }
  2519. const modelChangeRecord = async (val) => {
  2520. const response = await ModelChangeRecord({machine:val});
  2521. if (response.code === 0) {
  2522. huanxingselectData.value=response.data
  2523. }
  2524. }
  2525. import { nextTick } from 'vue';
  2526. //设备点检
  2527. function ondianjian() {
  2528. getSpotCheckItem(JTMC).then(treeData => {
  2529. if (treeData) {
  2530. // 如果获取成功,treeData 就是我们需要的树形结构数据
  2531. dianjiantreeData = treeData;
  2532. console.log('222');
  2533. console.log(dianjiantreeData);
  2534. // 使用 nextTick 来确保在更新 dianjianVisible 后立即刷新视图
  2535. nextTick(() => {
  2536. dianjianVisible.value = true;
  2537. });
  2538. // 这里可以处理treeData,例如将其赋值给某个状态管理变量或者用于渲染界面
  2539. } else {
  2540. // 如果获取失败,则treeData为null
  2541. console.log('获取巡检项目树形结构数据失败');
  2542. }
  2543. });
  2544. }
  2545. const onyinban = async() => {
  2546. console.log(formData.value.productCodes)
  2547. const res = await facilityPrintGetTab({productCode:formData.value.productCode})
  2548. if(res.code===0){
  2549. yinbantreeData.value=[{
  2550. label:'产品印版库',
  2551. children:res.data.map(item=>({
  2552. label:item.印版分类,
  2553. code:item.编号
  2554. }))
  2555. }]
  2556. console.log(res.data.map(item=>({
  2557. label:item.印版分类,
  2558. code:item.编号
  2559. })))
  2560. yinbanVisible.value = true;
  2561. }
  2562. }
  2563. const onxuncha = async() => {
  2564. xunchaVisible.value=true
  2565. }
  2566. //获取设备点检->检验项目
  2567. // const FacilityInspectionItem = async (value) => {
  2568. // try {
  2569. // // 调用接口获取巡检项目数据
  2570. // const response = await facilityInspectionItem({ unitName: value });
  2571. // // 检查接口返回的状态码
  2572. // if (response.code === 0) {
  2573. // dianjianselectData.splice(0, dianjianselectData.length, ...response.data.map(item=>{
  2574. // item.notjc=true;
  2575. // item.zc=false;
  2576. // item.yc=false;
  2577. // return item
  2578. // }))
  2579. // console.log(dianjianselectData)
  2580. // }
  2581. // } catch (error) {
  2582. // // 捕获并打印异常
  2583. // console.error("获取巡检项目数据出错:" + error);
  2584. // return null;
  2585. // }
  2586. // };
  2587. //获取设备点检->检验项目
  2588. const FacilityInspectionItem = async (value) => {
  2589. try {
  2590. // 调用接口获取巡检项目数据
  2591. const response = await facilityInspectionItem({ unitName: value ,machine:JTMC.split("#")[0]});
  2592. // 检查接口返回的状态码
  2593. if (response.code === 0) {
  2594. console.log(response)
  2595. dianjianselectData.splice(0, dianjianselectData.length, ...response.data.map(item=>{
  2596. item.notjc=true;
  2597. item.zc=false;
  2598. item.yc=false;
  2599. item.remark=''
  2600. item.unitName=value
  2601. item.team=BZMC.value
  2602. item.machine=JTMC
  2603. return item
  2604. }))
  2605. }
  2606. } catch (error) {
  2607. // 捕获并打印异常
  2608. console.error("获取巡检项目数据出错:" + error);
  2609. return null;
  2610. }
  2611. };
  2612. //机台印版领用->右侧详情
  2613. const facilityPrintDetailItem = async (value) => {
  2614. try {
  2615. // 调用接口获取巡检项目数据
  2616. // const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:productCode.value });
  2617. const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:formData.value.productCode });
  2618. // 检查接口返回的状态码
  2619. if (response.code === 0) {
  2620. console.log(response)
  2621. yinbanselectData.value=response.data
  2622. }
  2623. } catch (error) {
  2624. // 捕获并打印异常
  2625. console.error("获取数据出错:" + error);
  2626. return null;
  2627. }
  2628. };
  2629. //树形结构单机
  2630. const dianjianselectData = reactive([])
  2631. const yinbanselectData = ref([])
  2632. const xunchaselectData = ref([])
  2633. const dianjianNodeClick = (node, check, nodeData) => {
  2634. if (node.children && node.children.length > 0) {
  2635. // 点击的是父节点,且有子节点
  2636. // 执行相应的父节点单击事件处理逻辑
  2637. // 这里可以添加你想要的处理逻辑,比如展开/折叠节点等
  2638. } else {
  2639. // 点击的是子节点,或者没有子节点
  2640. // 执行相应的子节点单击事件处理逻辑
  2641. console.log(node.label)
  2642. console.log(JTMC.split("#")[0])
  2643. // FacilityInspectionItem({unitName:node.label ,machine:JTMC.split("#")[0]})
  2644. FacilityInspectionItem(node.label,)
  2645. }
  2646. };
  2647. const yinbanNodeClick = (node, check, nodeData) => {
  2648. if (node.children && node.children.length > 0) {
  2649. // 点击的是父节点,且有子节点
  2650. // 执行相应的父节点单击事件处理逻辑
  2651. // 这里可以添加你想要的处理逻辑,比如展开/折叠节点等
  2652. } else {
  2653. // 点击的是子节点,或者没有子节点
  2654. // 执行相应的子节点单击事件处理逻辑
  2655. facilityPrintDetailItem(node.code)
  2656. // console.log()
  2657. }
  2658. };
  2659. const xunchaNodeClick = (node, check, nodeData) => {
  2660. if(node){
  2661. fieldInspectionRecord()
  2662. }
  2663. }
  2664. const fieldInspectionRecord = async () => {
  2665. let time = new Date();
  2666. time.setDate(time.getDate() - 0); // 今天的前N天的日期,N自定义
  2667. time= `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}`;
  2668. console.log(time+' 08:30:00')
  2669. const response = await FieldInspectionRecord({ workOrder: formData.value.工单编号,team:BZMC.value,start:time+' 08:30:00' });
  2670. if (response.code === 0) {
  2671. xunchaselectData.value=response.data
  2672. }
  2673. }
  2674. let pandingfangfa=ref()
  2675. //检验项目单击
  2676. const dianjianhandle = (val, row) => {
  2677. try {
  2678. pandingfangfa.value = val.判定标准;
  2679. } catch (error) {
  2680. console.error('An error occurred:', error);
  2681. }
  2682. };
  2683. const notjcClick = (val) => {
  2684. console.log("不检测")
  2685. val.notjc==true
  2686. val.zc=false
  2687. val.yc==false
  2688. // try {
  2689. // if(val.notjc==false){
  2690. // val.zc=true
  2691. // }else{
  2692. // val.zc=false
  2693. // val.yc==false
  2694. // }
  2695. // } catch (error) {
  2696. // console.error('An error occurred:', error);
  2697. // }
  2698. };
  2699. const zcClick = (val) => {
  2700. console.log("合格")
  2701. val.notjc==false
  2702. val.zc=true
  2703. val.yc==false
  2704. // try {
  2705. // if(val.zc==false){
  2706. // val.zc=true
  2707. // }else{
  2708. // val.zc=false
  2709. // val.yc==false
  2710. // }
  2711. // } catch (error) {
  2712. // console.error('An error occurred:', error);
  2713. // }
  2714. };
  2715. const ycClick = (val) => {
  2716. console.log("不合格")
  2717. val.notjc==false
  2718. val.zc=false
  2719. val.yc==true
  2720. // try {
  2721. // if(val.yc==false){
  2722. // val.zc=true
  2723. // }else{
  2724. // val.zc=false
  2725. // val.notjc==false
  2726. // }
  2727. // } catch (error) {
  2728. // console.error('An error occurred:', error);
  2729. // }
  2730. };
  2731. const rowClassName = (row, column) => {
  2732. try {
  2733. if (row.unchecked) {
  2734. return 'row-yellow';
  2735. }
  2736. return '';
  2737. } catch (error) {
  2738. console.error('An error occurred:', error);
  2739. return '';
  2740. }
  2741. };
  2742. // 异步函数,用于获取指定设备的巡检项目,并且将结果格式化为树形结构数据
  2743. const getSpotCheckItem = async (machineName) => {
  2744. try {
  2745. // 调用接口获取巡检项目数据
  2746. const response = await facilitySpotCheckItem({ machine: machineName });
  2747. // 检查接口返回的状态码
  2748. if (response.code === 0) {
  2749. // 构建树形结构数据
  2750. const childrenData = Object.entries(response.data).map(([id, label]) => {
  2751. return {
  2752. id, // 子节点的唯一标识
  2753. label, // 子节点的标签
  2754. children: [] // 初始化子节点数组
  2755. };
  2756. });
  2757. // 创建包含父节点的树形结构数据
  2758. const treeData = [{
  2759. id: machineName, // 父节点的唯一标识
  2760. label: machineName, // 父节点的标签
  2761. children: childrenData // 子节点数据
  2762. }];
  2763. // 返回构建好的树形结构数据
  2764. return treeData;
  2765. } else {
  2766. // 如果接口返回的状态码不是0,打印错误信息
  2767. console.error("接口返回错误:" + response.msg);
  2768. return null;
  2769. }
  2770. } catch (error) {
  2771. // 捕获并打印异常
  2772. console.error("获取巡检项目数据出错:" + error);
  2773. return null;
  2774. }
  2775. };
  2776. // 班组人员及分配比例
  2777. const FacilityTeam = async (value) => {
  2778. const response = await facilityTeam({ machine: value });
  2779. if (response.code === 0) {
  2780. // formData.value.班组 = response.data[0]['班组号'];
  2781. BZMC.value=response.data[0]['班组号']
  2782. // if(response.data[0][2]){
  2783. // // console.log(response.data[0][2].split(' '));
  2784. // for (let i = 1; i <= 3; i++) {
  2785. // const sczl_bh = `sczl_bh${i}`;
  2786. // const sczl_name = `sczl_name${i}`;
  2787. // formData.value[sczl_bh] = response.data[0][i-1].split(' ')[0];
  2788. // formData.value[sczl_name] = response.data[0][i-1].split(' ')[1];
  2789. // }
  2790. // }
  2791. // if(response.data[0][0]){
  2792. // // console.log(response.data[0][2].split(' '));
  2793. // for (let i = 1; i <= 1; i++) {
  2794. // const sczl_bh = `sczl_bh${i}`;
  2795. // const sczl_name = `sczl_name${i}`;
  2796. // formData.value[sczl_bh] = response.data[0][i-1].split(' ')[0];
  2797. // formData.value[sczl_name] = response.data[0][i-1].split(' ')[1];
  2798. // }
  2799. // }
  2800. // if(response.data[0][1]){
  2801. // // console.log(response.data[0][2].split(' '));
  2802. // for (let i = 1; i <= 2; i++) {
  2803. // const sczl_bh = `sczl_bh${i}`;
  2804. // const sczl_name = `sczl_name${i}`;
  2805. // formData.value[sczl_bh] = response.data[0][i-1].split(' ')[0];
  2806. // formData.value[sczl_name] = response.data[0][i-1].split(' ')[1];
  2807. // }
  2808. // }
  2809. // if(response.data[0][3]){
  2810. // // console.log(response.data[0][2].split(' '));
  2811. // for (let i = 1; i <= 4; i++) {
  2812. // const sczl_bh = `sczl_bh${i}`;
  2813. // const sczl_name = `sczl_name${i}`;
  2814. // formData.value[sczl_bh] = response.data[0][i-1].split(' ')[0];
  2815. // formData.value[sczl_name] = response.data[0][i-1].split(' ')[1];
  2816. // }
  2817. // }
  2818. InspectionRecord()
  2819. FacilityDetail()
  2820. // 清空 bzData 数组
  2821. bzData.splice(0, bzData.length);
  2822. // 遍历接口返回的数据,并给每个对象添加 JTMC 属性
  2823. const updatedData = response.data.map(item => {
  2824. return { ...item, JTMC: value }; // 添加 JTMC 属性
  2825. });
  2826. // 将更新后的数据添加到 bzData 数组
  2827. bzData.push(...updatedData);
  2828. FPData.push(...updatedData)
  2829. return 1
  2830. }
  2831. };
  2832. //班组维护
  2833. function onBZ() {
  2834. FacilityTeam(JTMC)
  2835. fetchData()
  2836. detailShow.value=true
  2837. console.log('2222')
  2838. }
  2839. const addBz = async() => {
  2840. // selectedOption.value='YS-JY06-002||印品质量检测机(JP1020-18)'
  2841. console.log(selectedOption.value)
  2842. console.log(BZMC.value)
  2843. console.log(selectedOption.value.split('|')[0])
  2844. const response = await MachineTeamAdd({
  2845. sczl_jtbh: selectedOption.value.split('|')[0],
  2846. sczl_bzdh: BZMC.value,
  2847. sczl_bh1: formDatas.value.code1,
  2848. sczl_bh2: formDatas.value.code2,
  2849. sczl_bh3: formDatas.value.code3,
  2850. sczl_bh4: formDatas.value.code4,
  2851. sczl_bh5: formDatas.value.code5,
  2852. sczl_bh6: formDatas.value.code6,
  2853. sczl_bh7: formDatas.value.code7,
  2854. sczl_bh8: formDatas.value.code10,
  2855. sczl_bh9: formDatas.value.code9,
  2856. sczl_bh10: formDatas.value.code8,
  2857. sczl_rate1: formDatas.value.percentage1,
  2858. sczl_rate2: formDatas.value.percentage2,
  2859. sczl_rate3: formDatas.value.percentage3,
  2860. sczl_rate4: formDatas.value.percentage4,
  2861. sczl_rate5: formDatas.value.percentage5,
  2862. sczl_rate6: formDatas.value.percentage6,
  2863. sczl_rate7: formDatas.value.percentage7,
  2864. sczl_rate8: formDatas.value.percentage10,
  2865. sczl_rate9: formDatas.value.percentage9,
  2866. sczl_rate10: formDatas.value.percentage8,
  2867. sys_id: sys_id
  2868. })
  2869. // console.log()
  2870. if (response.code === 0) {
  2871. ElMessage({
  2872. type: 'success',
  2873. message: '成功'
  2874. })
  2875. FacilityTeam(JTMC)
  2876. fetchData()
  2877. // FacilityProduction()
  2878. }
  2879. }
  2880. const currentBz ={}
  2881. const selectBz = async() => {
  2882. if(currentBz.value){
  2883. BZMC.value=currentBz.value.班组号
  2884. let sczl_bhkey=''
  2885. let sczl_namekey=''
  2886. if (currentBz.value[9]) {
  2887. for (let i = 1; i <= 9; i++) {
  2888. sczl_bhkey=`sczl_bh${i}`
  2889. sczl_namekey=`sczl_name${i}`
  2890. formData.value[sczl_bhkey] = '';
  2891. formData.value[sczl_namekey] = '';
  2892. }
  2893. formData.value.sczl_bh10 = currentBz.value[9].split(' ')[0];
  2894. formData.value.sczl_name10=currentBz.value[9].split(' ')[1]
  2895. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length-5, 6); i++) {
  2896. sczl_bhkey=`sczl_bh${i}`
  2897. sczl_namekey=`sczl_name${i}`
  2898. console.log(currentBz.value[i-1].split(' '))
  2899. formData.value[sczl_bhkey] = currentBz.value[i-1].split(' ')[0];
  2900. formData.value[sczl_namekey] = currentBz.value[i-1].split(' ')[1];
  2901. classbz.value[i-1]=currentBz.value[i-1].split(' ')[0]
  2902. }
  2903. classbz.value.push(currentBz.value[9].split(' ')[0])
  2904. formData.value.class=classbz.value.join(',')
  2905. console.log(formData.value)
  2906. }else{
  2907. for (let i = 1; i <= 10; i++) {
  2908. sczl_bhkey=`sczl_bh${i}`
  2909. sczl_namekey=`sczl_name${i}`
  2910. formData.value[sczl_bhkey] = '';
  2911. formData.value[sczl_namekey] = '';
  2912. }
  2913. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length-4, 6); i++) {
  2914. sczl_bhkey=`sczl_bh${i}`
  2915. sczl_namekey=`sczl_name${i}`
  2916. console.log(currentBz.value[i-1].split(' '))
  2917. formData.value[sczl_bhkey] = currentBz.value[i-1].split(' ')[0];
  2918. formData.value[sczl_namekey] = currentBz.value[i-1].split(' ')[1];
  2919. classbz.value[i-1]=currentBz.value[i-1].split(' ')[0]
  2920. }
  2921. formData.value.class=classbz.value.join(',')
  2922. }
  2923. const response = await setMachineTeam({
  2924. machine: JTMC.split("#")[0],
  2925. order:formData.value.工单编号,
  2926. yjno:formData.value.印件号,
  2927. gy_name:formData.value.工序名称,
  2928. sczl_bzdh:BZMC.value,
  2929. status:'生产',
  2930. production_now:0,
  2931. production_all:0,
  2932. team_id:currentBz.value.ID
  2933. })
  2934. if(response.code===0){
  2935. ElMessage({
  2936. type: 'success',
  2937. message: '成功'
  2938. })
  2939. FacilityProduction()
  2940. }
  2941. // currentBz.value={}
  2942. }
  2943. }
  2944. const delBz = async() => {
  2945. const UniqId=currentBz.value.ID
  2946. if(currentBz.value){
  2947. ElMessageBox.confirm('确定要删除吗?', '提示', {
  2948. confirmButtonText: '确定',
  2949. cancelButtonText: '取消',
  2950. type: 'warning'
  2951. }).then(() => {
  2952. const response = teamDel({UniqId:UniqId})
  2953. response.then(result => {
  2954. if(result.code===0){
  2955. ElMessage({
  2956. type: 'success',
  2957. message: '成功'
  2958. })
  2959. console.log(response)
  2960. FacilityTeam(JTMC)
  2961. fetchData()
  2962. }
  2963. });
  2964. })
  2965. currentBz.value={}
  2966. }
  2967. }
  2968. // 下拉框选项数据
  2969. const dropdownOptions = ref([]);
  2970. // 选中的选项
  2971. const selectedOption = ref('');
  2972. // 获取接口数据并转换为下拉框需要的格式
  2973. const fetchData = async () => {
  2974. try {
  2975. // Simulate API call
  2976. const response = await facilityMachineList();
  2977. if (response.code === 0) {
  2978. // Transform data format
  2979. const options = response.data.map((item) => ({
  2980. label: item,
  2981. value: item
  2982. }));
  2983. dropdownOptions.value = options;
  2984. // Default to selecting the first option
  2985. const defaultOption = options.find(option => option.value === JTMC);
  2986. if (defaultOption) {
  2987. selectedOption.value = defaultOption.value;
  2988. } else if (options.length > 0) {
  2989. // 如果 myDefaultValue 不在选项中,选择第一个选项
  2990. selectedOption.value = options[0].value;
  2991. }
  2992. }
  2993. } catch (error) {
  2994. console.error('Error fetching data:', error);
  2995. // Handle the error appropriately
  2996. }
  2997. };
  2998. // formData
  2999. let BZMC=ref()
  3000. let lastCellValue=ref()
  3001. let parts =reactive([])
  3002. // 自动化生成的字典(可能为空)以及字段
  3003. const formData= ref({
  3004. 工单编号:'',
  3005. 印件编号:'',
  3006. 工序名称:'',
  3007. 产品名称:'',
  3008. sczl_bh1:'',
  3009. sczl_bh2:'',
  3010. sczl_bh3:'',
  3011. sczl_bh4:'',
  3012. sczl_bh5:'',
  3013. sczl_bh6:'',
  3014. sczl_bh7:'',
  3015. sczl_bh8:'',
  3016. sczl_bh9:'',
  3017. sczl_bh10:'',
  3018. sczl_name1:'',
  3019. sczl_name2:'',
  3020. sczl_name3:'',
  3021. sczl_name4:'',
  3022. sczl_name5:'',
  3023. sczl_name6:'',
  3024. sczl_name7:'',
  3025. sczl_name8:'',
  3026. sczl_name9:'',
  3027. sczl_name10:'',
  3028. })
  3029. const formDatasData= reactive([])
  3030. const formDatas = ref({
  3031. code1:'',
  3032. code2:'',
  3033. code3:'',
  3034. code4:'',
  3035. code5:'',
  3036. code6:'',
  3037. code7:'',
  3038. code8:'',
  3039. code9:'',
  3040. code10:'',
  3041. name1:'',
  3042. name2:'',
  3043. name3:'',
  3044. name4:'',
  3045. name5L:'',
  3046. name6:'',
  3047. name7:'',
  3048. name8:'',
  3049. name9:'',
  3050. name10:'',
  3051. percentage1:'',
  3052. percentage2:'',
  3053. percentage3:'',
  3054. percentage4:'',
  3055. percentage5:'',
  3056. percentage6:'',
  3057. percentage7:'',
  3058. percentage8:'',
  3059. percentage9:'',
  3060. percentage10:'',
  3061. })
  3062. //班组单击
  3063. const BZhandle = (val) => {
  3064. currentBz.value = val
  3065. formDatas.value = {};
  3066. let sczl_bhkey = ''
  3067. let sczl_namekey = ''
  3068. let percentagekey = ''
  3069. if (currentBz.value[9]) {
  3070. for (let i = 1; i <= 9; i++) {
  3071. sczl_bhkey = `code${i}`
  3072. sczl_namekey = `name${i}`
  3073. percentagekey = `percentage${i}`
  3074. formDatas.value[sczl_bhkey] = '';
  3075. formDatas.value[sczl_namekey] = '';
  3076. formDatas.value[percentagekey] = '';
  3077. }
  3078. formDatas.value.code8 = currentBz.value[9].split(' ')[0];
  3079. formDatas.value.name8 = currentBz.value[9].split(' ')[1]
  3080. formDatas.value.percentage8 = parseFloat(currentBz.value[9].split(' ')[2].split('(')[1].split(')')[0])/100
  3081. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length - 5, 6); i++) {
  3082. sczl_bhkey = `code${i}`
  3083. sczl_namekey = `name${i}`
  3084. percentagekey = `percentage${i}`
  3085. formDatas.value[sczl_bhkey] = currentBz.value[i - 1].split(' ')[0];
  3086. formDatas.value[sczl_namekey] = currentBz.value[i - 1].split(' ')[1];
  3087. if(isNaN(parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
  3088. formDatas.value[percentagekey] = currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
  3089. }else{
  3090. formDatas.value[percentagekey] = parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0])/100;
  3091. }
  3092. }
  3093. } else {
  3094. for (let i = 1; i <= 10; i++) {
  3095. sczl_bhkey = `code${i}`
  3096. sczl_namekey = `name${i}`
  3097. percentagekey = `percentage${i}`
  3098. formDatas.value[sczl_bhkey] = '';
  3099. formDatas.value[sczl_namekey] = '';
  3100. formDatas.value[percentagekey] = '';
  3101. }
  3102. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length - 4, 6); i++) {
  3103. sczl_bhkey = `code${i}`
  3104. sczl_namekey = `name${i}`
  3105. percentagekey = `percentage${i}`
  3106. formDatas.value[sczl_bhkey] = currentBz.value[i - 1].split(' ')[0];
  3107. formDatas.value[sczl_namekey] = currentBz.value[i - 1].split(' ')[1];
  3108. if(isNaN(parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0]))){
  3109. formDatas.value[percentagekey] = currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0];
  3110. }else{
  3111. formDatas.value[percentagekey] = parseFloat(currentBz.value[i - 1].split(' ')[2].split('(')[1].split(')')[0])/100;
  3112. }
  3113. }
  3114. }
  3115. console.log(formDatas)
  3116. // for (const key in val) {
  3117. // if (val[key] === 0) {
  3118. // break;
  3119. // }
  3120. // const parts = val[key].split(/[\s()]+/);
  3121. // const code = parts[0];
  3122. // const name = parts[1];
  3123. // const percentage = parts[2];
  3124. //
  3125. // // 根据索引填充不同的字段
  3126. // const index = parseInt(key) + 1; // 索引从1开始
  3127. // formDatas.value['code' + index] = code;
  3128. // formDatas.value['name' + index] = name;
  3129. // formDatas.value['percentage' + index] = percentage;
  3130. BZMC.value=val.班组号
  3131. // }
  3132. };
  3133. const chanliangVisible = ref(false)
  3134. const formdata3=reactive([])
  3135. function gytableDatadoubleClick(row, column, event) {
  3136. console.log(row)
  3137. type2.value="update"
  3138. MachineChanliang(row.UniqId)
  3139. }
  3140. const uid=ref()
  3141. function getUid(row, column, event) {
  3142. uid.value=row.UniqId
  3143. console.log(uid.value)
  3144. }
  3145. //获取详细信息
  3146. const MachineChanliang = async(value) => {
  3147. const response = await MachineChanliangDetail({UniqId:value});
  3148. if (response.code === 0) {
  3149. chanliangVisible.value=true
  3150. formdata3.value=response.data
  3151. const result=formdata3.value.gxmc.match(/-(.{2})/)
  3152. // const pattern = /-(.*?)〖(.*?)$/;
  3153. // const matches = formdata3.value.gxmc.match(pattern);
  3154. formdata3.value.gymc=result[1]
  3155. formdata3.value.sczl_jtbh=JTMC
  3156. formdata3.value.rq=date
  3157. console.log(formdata3.value.bzdh)
  3158. if (formdata3.value.bzdh === 'A班') {
  3159. console.log(date + " 08:00:00");
  3160. formdata3.value.starttime = ''; // 清空值
  3161. setTimeout(()=>{
  3162. formdata3.value.starttime = date + " 08:30:00"; // 设置为 20:30:00
  3163. })
  3164. } else if (formdata3.value.bzdh === 'B班') {
  3165. console.log(date + " 20:30:00");
  3166. formdata3.value.starttime = ''; // 清空值
  3167. setTimeout(()=>{
  3168. formdata3.value.starttime = date + " 20:30:00"; // 设置为 20:30:00
  3169. })
  3170. }
  3171. console.log(formdata3.value)
  3172. }
  3173. }
  3174. const yjnoArr = ref([0])
  3175. const gxmc = ref('')
  3176. //工单编号回车事件
  3177. const getCPMCsubmit = () => {
  3178. if(formdata3.value.工单编号!=''){
  3179. ChanliangWorkorder({search:formdata3.value.工单编号,machine:JTMC}).then(response=>{
  3180. if (response.code === 0) {
  3181. formdata3.value.cpmc = response.data[0].cpmc
  3182. document.getElementById('产品名称').style.color = 'red';
  3183. getYJMCsubmit()
  3184. }else{
  3185. formdata3.value.工单编号 = '';
  3186. formdata3.value.cpmc = '';
  3187. document.getElementById('产品名称').style.color = 'black';
  3188. }
  3189. });
  3190. }else{
  3191. ElMessage({
  3192. type: 'error',
  3193. message: '请注意, 工单编号输入空置, 除非有特殊需要!'
  3194. })
  3195. gxmc.value = '';
  3196. document.getElementById('产品名称').style.color = 'black';
  3197. }
  3198. }
  3199. const yjnoHandleFocus = () =>{
  3200. if(yjnoArr.value[0] == 0){
  3201. formdata3.value.yjno = 1;
  3202. }else{
  3203. formdata3.value.yjno = yjnoArr.value[0];
  3204. }
  3205. }
  3206. //印件号失去焦点事件
  3207. const getYJMCsubmit = () => {
  3208. if(formdata3.value.工单编号!='' && formdata3.value.yjno!=''){
  3209. //获取印件名称
  3210. ChanliangPrintDetail({gdbh:formdata3.value.工单编号}).then(response=>{
  3211. if (response.code === 0) {
  3212. formdata3.value.yjmc = response.data[0].yjmc
  3213. formdata3.value.yjno = response.data[0].yjno
  3214. setColorReadonly('印件名称')
  3215. }else{
  3216. ElMessage({
  3217. type: 'error',
  3218. message: '印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!'
  3219. })
  3220. }
  3221. });
  3222. }else{
  3223. ElMessage({
  3224. type: 'error',
  3225. message: '印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!'
  3226. })
  3227. }
  3228. }
  3229. //工序名称获得焦点事件
  3230. const gxmcHandleFocus = () =>{
  3231. if(gxmc.value != ''){
  3232. formdata3.value.gxmc = gxmc.value.sczl_gxmc;
  3233. }else{
  3234. formdata3.value.gxmc = '';
  3235. }
  3236. }
  3237. //工序失去焦点事件
  3238. const getGXsubmit = () => {
  3239. setColorReadonly('工序号')
  3240. setColorReadonly('工艺名称')
  3241. //弹出选择
  3242. ChanliangProcessDetail({gdbh:formdata3.value.工单编号,yjno:formdata3.value.yjno,machine:JTMC}).then(response=>{
  3243. if (response.code === 0) {
  3244. formdata3.value.gxmc=response.data[0].name
  3245. formdata3.value.gxh=response.data[0].gxh
  3246. const res=response.data[0].name.match(/>(.{2})/)
  3247. formdata3.value.gymc=res[1]
  3248. // selectData.splice(0, selectData.length, ...response.data)
  3249. // GXVisible.value=true
  3250. // nextTick(()=>{
  3251. // console.log(tableRef)
  3252. // console.log(selectData)
  3253. // tableRef.value.setCurrentRow(selectData[0]);
  3254. // tableRef.value.focus();
  3255. // });
  3256. }
  3257. })
  3258. }
  3259. //获取员工信息
  3260. const GetYg = (event,inputName) => {
  3261. // console.log(eval(`formdata3.value.组员${inputName}['编号']`))
  3262. if(eval(`formdata3.value.组员${inputName}['编号']`)===""){
  3263. console.log("123")
  3264. }else{
  3265. const value=ref()
  3266. if(inputName==='11'){
  3267. value.value=formdata3.value.拉料['编号']
  3268. }else{
  3269. value.value= eval(`formdata3.value.组员${inputName}['编号']`)
  3270. }
  3271. EmployeeData({code:value.value}).then(response=>{
  3272. if (response.code === 0) {
  3273. if(inputName==='1'){
  3274. formdata3.value.组员1['姓名']=response.data[0].员工姓名;
  3275. }else if(inputName==='2'){
  3276. formdata3.value.组员2['姓名']=response.data[0].员工姓名;
  3277. }else if(inputName==='3'){
  3278. formdata3.value.组员3['姓名']=response.data[0].员工姓名;
  3279. }else if(inputName==='4'){
  3280. formdata3.value.组员4['姓名']=response.data[0].员工姓名;
  3281. }else if(inputName==='5'){
  3282. formdata3.value.组员5['姓名']=response.data[0].员工姓名;
  3283. }else if(inputName==='6'){
  3284. formdata3.value.组员6['姓名']=response.data[0].员工姓名;
  3285. }else if(inputName==='7'){
  3286. formdata3.value.组员7['姓名']=response.data[0].员工姓名;
  3287. }else if(inputName==='8'){
  3288. formdata3.value.组员8['姓名']=response.data[0].员工姓名;
  3289. }else if(inputName==='9'){
  3290. formdata3.value.组员9['姓名']=response.data[0].员工姓名;
  3291. }else if(inputName==='10'){
  3292. formdata3.value.组员10['姓名']=response.data[0].员工姓名;
  3293. }else if(inputName==='11'){
  3294. formdata3.value.拉料['姓名']=response.data[0].员工姓名;
  3295. }
  3296. }else{
  3297. // formdata3.value['sczl_bh'+inputName+'_name'] = '';
  3298. }
  3299. })
  3300. }
  3301. }
  3302. //追加字体颜色和不可输入
  3303. const setColorReadonly = (id) => {
  3304. const newInput = document.getElementById(id)
  3305. newInput.style.color = 'red';
  3306. newInput.setAttribute('readonly', true);
  3307. }
  3308. //追加字体颜色和可输入
  3309. const unsetColorReadonly = (id) => {
  3310. const newInput = document.getElementById(id)
  3311. newInput.style.color = 'black';
  3312. newInput.removeAttribute('readonly');
  3313. }
  3314. //日报表修改弹窗确定
  3315. const chanliangenterDialog = async () => {
  3316. // SubmitDailyProduction()
  3317. if (type2.value === 'update') {
  3318. SubmitDailyProduction()
  3319. } else if (type2.value === 'create') {
  3320. add()
  3321. }
  3322. }
  3323. //日报表新增
  3324. const add = async () => {
  3325. // console.log(date+''+formdata3.value.starttime)
  3326. const rate1=(parseFloat(formdata3.value.组员1['比例']) / 100).toFixed(5)
  3327. const rate2=(parseFloat(formdata3.value.组员2['比例']) / 100).toFixed(5)
  3328. const rate3=(parseFloat(formdata3.value.组员3['比例']) / 100).toFixed(5)
  3329. const rate4=(parseFloat(formdata3.value.组员4['比例']) / 100).toFixed(5)
  3330. const rate5=(parseFloat(formdata3.value.组员5['比例']) / 100).toFixed(5)
  3331. const rate6=(parseFloat(formdata3.value.组员6['比例']) / 100).toFixed(5)
  3332. const rate7=(parseFloat(formdata3.value.组员7['比例']) / 100).toFixed(5)
  3333. const rate8=(parseFloat(formdata3.value.组员8['比例']) / 100).toFixed(5)
  3334. const rate9=(parseFloat(formdata3.value.组员9['比例']) / 100).toFixed(5)
  3335. const rate10=(parseFloat(formdata3.value.组员10['比例']) / 100).toFixed(5)
  3336. const restoredData = {
  3337. sczl_gdbh:formdata3.value.工单编号,
  3338. sczl_yjno:formdata3.value.yjno,
  3339. sczl_gxh:formdata3.value.gxh,
  3340. sczl_gxmc: formdata3.value.gxmc,
  3341. sczl_bzdh: formdata3.value.bzdh,
  3342. sczl_bh1: formdata3.value.组员1['编号'],
  3343. sczl_bh2: formdata3.value.组员2['编号'],
  3344. sczl_bh3: formdata3.value.组员3['编号'],
  3345. sczl_bh4: formdata3.value.组员4['编号'],
  3346. sczl_bh5: formdata3.value.组员5['编号'],
  3347. sczl_bh6: formdata3.value.组员6['编号'],
  3348. sczl_bh7: formdata3.value.组员7['编号'],
  3349. sczl_bh8: formdata3.value.组员8['编号'],
  3350. sczl_bh9: formdata3.value.组员9['编号'],
  3351. sczl_bh10: formdata3.value.组员10['编号'],
  3352. sczl_bh98:formdata3.value.组员1['编号'],
  3353. sczl_rate1: rate1,
  3354. sczl_rate2: rate2,
  3355. sczl_rate3: rate3,
  3356. sczl_rate4: rate4,
  3357. sczl_rate5: rate5,
  3358. sczl_rate6: rate6,
  3359. sczl_rate7: rate7,
  3360. sczl_rate8: rate8,
  3361. sczl_rate9: rate9,
  3362. sczl_rate10: rate10,
  3363. sczl_jtbh: formdata3.value.sczl_jtbh,
  3364. 开工时间:formdata3.value.starttime,
  3365. 码开始行:formdata3.value.码开始行,
  3366. 码结束行:formdata3.value.码结束行,
  3367. sys_id:sys_id,
  3368. sczl_装版工时:formdata3.value.装版补产工时,
  3369. sczl_打样工时:formdata3.value.打样补产工时,
  3370. sczl_异常类型1:formdata3.value.异常类型,
  3371. sczl_异常工时1:formdata3.value.异常总工时,
  3372. sczl_保养工时:formdata3.value.保养工时,
  3373. sczl_dedh:formdata3.value.dedh,
  3374. sczl_rq: date,
  3375. sczl_num: formdata3.value.num,
  3376. // sczl_rq: formData3.value.sczl_rq,
  3377. sczl_cl: formdata3.value.产量,
  3378. sczl_zcfp: formdata3.value.制程废品,
  3379. sczl_zccp: formdata3.value.制程次品,
  3380. sczl_前工序废: formdata3.value.前工序废,
  3381. sczl_来料少数: formdata3.value.来料异常,
  3382. sczl_ls: formdata3.value.联数,
  3383. sczl_ms: formdata3.value.色度数,
  3384. sczl_装版总工时: formdata3.value.装版工时,
  3385. sczl_打样总工时: formdata3.value.打样工时,
  3386. sczl_设备运行工时: formdata3.value.通电工时,
  3387. 码包: formdata3.value.码包,
  3388. 辅电表: formdata3.value.辅电表,
  3389. 主电表:formdata3.value.主电表,
  3390. sczl_bh98: formdata3.value.拉料['编号'],
  3391. }
  3392. console.log(restoredData)
  3393. const response = await ChanliangAdd(restoredData);
  3394. if (response.code === 0) {
  3395. ElMessage({
  3396. type: 'success',
  3397. message: '成功'
  3398. })
  3399. FacilitychanLiang()
  3400. FacilityDetail()
  3401. chanliangVisible.value=false
  3402. }
  3403. }
  3404. //日报表上传
  3405. const SubmitDailyProduction = async () => {
  3406. const rate1=(parseFloat(formdata3.value.组员1['比例']) / 100).toFixed(5)
  3407. const rate2=(parseFloat(formdata3.value.组员2['比例']) / 100).toFixed(5)
  3408. const rate3=(parseFloat(formdata3.value.组员3['比例']) / 100).toFixed(5)
  3409. const rate4=(parseFloat(formdata3.value.组员4['比例']) / 100).toFixed(5)
  3410. const rate5=(parseFloat(formdata3.value.组员5['比例']) / 100).toFixed(5)
  3411. const rate6=(parseFloat(formdata3.value.组员6['比例']) / 100).toFixed(5)
  3412. const rate7=(parseFloat(formdata3.value.组员7['比例']) / 100).toFixed(5)
  3413. const rate8=(parseFloat(formdata3.value.组员8['比例']) / 100).toFixed(5)
  3414. const rate9=(parseFloat(formdata3.value.组员9['比例']) / 100).toFixed(5)
  3415. const rate10=(parseFloat(formdata3.value.组员10['比例']) / 100).toFixed(5)
  3416. const restoredData = {
  3417. sczl_gdbh:formdata3.value.工单编号,
  3418. sczl_yjno:formdata3.value.yjno,
  3419. sczl_gxh:formdata3.value.gxh,
  3420. sczl_gxmc: formdata3.value.gxmc,
  3421. sczl_bzdh: formdata3.value.bzdh,
  3422. sczl_bh1: formdata3.value.组员1['编号'],
  3423. sczl_bh2: formdata3.value.组员2['编号'],
  3424. sczl_bh3: formdata3.value.组员3['编号'],
  3425. sczl_bh4: formdata3.value.组员4['编号'],
  3426. sczl_bh5: formdata3.value.组员5['编号'],
  3427. sczl_bh6: formdata3.value.组员6['编号'],
  3428. sczl_bh7: formdata3.value.组员7['编号'],
  3429. sczl_bh8: formdata3.value.组员8['编号'],
  3430. sczl_bh9: formdata3.value.组员9['编号'],
  3431. sczl_bh10: formdata3.value.组员10['编号'],
  3432. sczl_bh98:formdata3.value.组员1['编号'],
  3433. sczl_rate1: rate1,
  3434. sczl_rate2: rate2,
  3435. sczl_rate3: rate3,
  3436. sczl_rate4: rate4,
  3437. sczl_rate5: rate5,
  3438. sczl_rate6: rate6,
  3439. sczl_rate7: rate7,
  3440. sczl_rate8: rate8,
  3441. sczl_rate9: rate9,
  3442. sczl_rate10: rate10,
  3443. sczl_jtbh: formdata3.value.sczl_jtbh,
  3444. 开工时间:"2024-03-12 08:30:00",
  3445. 码开始行:formdata3.value.码开始行,
  3446. 码结束行:formdata3.value.码结束行,
  3447. sys_id:sys_id,
  3448. sczl_装版工时:formdata3.value.装版补产工时,
  3449. sczl_打样工时:formdata3.value.打样补产工时,
  3450. sczl_异常类型1:formdata3.value.异常类型,
  3451. sczl_异常工时1:formdata3.value.异常总工时,
  3452. sczl_保养工时:formdata3.value.保养工时,
  3453. sczl_dedh:formdata3.value.dedh,
  3454. sczl_rq: date,
  3455. sczl_num: formdata3.value.num,
  3456. // sczl_rq: formData3.value.sczl_rq,
  3457. sczl_cl: formdata3.value.产量,
  3458. sczl_zcfp: formdata3.value.制程废品,
  3459. sczl_zccp: formdata3.value.制程次品,
  3460. sczl_前工序废: formdata3.value.前工序废,
  3461. sczl_来料少数: formdata3.value.来料异常,
  3462. sczl_ls: formdata3.value.联数,
  3463. sczl_ms: formdata3.value.色度数,
  3464. sczl_装版总工时: formdata3.value.装版工时,
  3465. sczl_打样总工时: formdata3.value.打样工时,
  3466. sczl_设备运行工时: formdata3.value.通电工时,
  3467. 码包: formdata3.value.码包,
  3468. 辅电表: formdata3.value.辅电表,
  3469. 主电表:formdata3.value.主电表,
  3470. sczl_bh98: formdata3.value.拉料['编号'],
  3471. UniqId:uid.value
  3472. }
  3473. console.log(restoredData)
  3474. // console.log(formData3.value.formattedArray)
  3475. const response = await MachineChanliangDetailEdit(restoredData);
  3476. console.log(response)
  3477. if (response.code === 0) {
  3478. ElMessage({
  3479. type: 'success',
  3480. message: '成功'
  3481. })
  3482. FacilitychanLiang()
  3483. FacilityDetail()
  3484. chanliangVisible.value=false
  3485. }
  3486. }
  3487. const ent1 = (event) => {
  3488. const inputs = document.getElementsByTagName('input');
  3489. const currentIndex = Array.from(inputs).indexOf(event.target);
  3490. if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
  3491. let nextIndex = currentIndex + 1;
  3492. while (nextIndex < inputs.length) {
  3493. if (inputs[nextIndex].disabled) {
  3494. console.log("当前输入框为disabled,跳过");
  3495. nextIndex++; // 跳过disabled的输入框
  3496. continue;
  3497. }
  3498. if (!inputs[nextIndex].readOnly) {
  3499. nextTick(() => {
  3500. inputs[nextIndex].focus();
  3501. inputs[nextIndex].select();
  3502. });
  3503. break;
  3504. }
  3505. nextIndex++;
  3506. }
  3507. }
  3508. else if (event.keyCode === 38) { // 向上箭头
  3509. for (let i = currentIndex - 1; i >= 0; i--) {
  3510. if (!inputs[i].readOnly) {
  3511. nextTick(()=>{
  3512. inputs[i].focus();
  3513. inputs[i].select();
  3514. })
  3515. break;
  3516. }
  3517. }
  3518. } else if (event.keyCode === 8) { // 删除箭头
  3519. if (event.target.selectionStart === 0) {
  3520. for (let i = currentIndex - 1; i >= 0; i--) {
  3521. if (!inputs[i].readOnly) {
  3522. nextTick(()=>{
  3523. inputs[i].focus();
  3524. inputs[i].setSelectionRange(0, 0);
  3525. })
  3526. break;
  3527. }
  3528. }
  3529. }
  3530. } else if (event.keyCode === 37) { // 向左箭头
  3531. if (event.target.selectionStart === 0) {
  3532. for (let i = currentIndex - 1; i >= 0; i--) {
  3533. if (!inputs[i].readOnly) {
  3534. nextTick(()=>{
  3535. inputs[i].focus();
  3536. inputs[i].select();
  3537. })
  3538. break;
  3539. }
  3540. }
  3541. }
  3542. } else if (event.keyCode === 39) { // 向右箭头
  3543. if (event.target.selectionStart === event.target.value.length) {
  3544. for (let i = currentIndex + 1; i < inputs.length; i++) {
  3545. if (!inputs[i].readOnly) {
  3546. nextTick(()=>{
  3547. inputs[i].focus();
  3548. inputs[i].select();
  3549. })
  3550. break;
  3551. }
  3552. }
  3553. }
  3554. }
  3555. }
  3556. // ============== 表格控制部分结束 ===============
  3557. // 获取需要的字典 可能为空 按需保留
  3558. const setOptions = async () =>{
  3559. }
  3560. // 获取需要的字典 可能为空 按需保留
  3561. setOptions()
  3562. // 多选数据
  3563. const multipleSelection = ref([])
  3564. // 多选
  3565. const handleSelectionChange = (val) => {
  3566. multipleSelection.value = val
  3567. console.log(val)
  3568. }
  3569. // 删除行
  3570. const deleteRow = (row) => {
  3571. ElMessageBox.confirm('确定要删除吗?', '提示', {
  3572. confirmButtonText: '确定',
  3573. cancelButtonText: '取消',
  3574. type: 'warning'
  3575. }).then(() => {
  3576. deleteCompanyFunc(row)
  3577. })
  3578. }
  3579. // 批量删除控制标记
  3580. const deleteVisible = ref(false)
  3581. // 多选删除
  3582. const onDelete = async() => {
  3583. const ids = []
  3584. if (multipleSelection.value.length === 0) {
  3585. ElMessage({
  3586. type: 'warning',
  3587. message: '请选择要删除的数据'
  3588. })
  3589. return
  3590. }
  3591. multipleSelection.value &&
  3592. multipleSelection.value.map(item => {
  3593. ids.push(item.ID)
  3594. })
  3595. const res = await deleteCompanyByIds({ ids })
  3596. if (res.code === 0) {
  3597. ElMessage({
  3598. type: 'success',
  3599. message: '删除成功'
  3600. })
  3601. if (tableData.value.length === ids.length && page.value > 1) {
  3602. page.value--
  3603. }
  3604. deleteVisible.value = false
  3605. getTableData()
  3606. }
  3607. }
  3608. // 行为控制标记(弹窗内部需要增还是改)
  3609. const type = ref('')
  3610. // 更新行
  3611. const updateCompanyFunc = async(row) => {
  3612. const res = await findCompany({ ID: row.ID })
  3613. type.value = 'update'
  3614. if (res.code === 0) {
  3615. formData.value = res.data.recompany
  3616. dialogFormVisible.value = true
  3617. }
  3618. }
  3619. const cpcode=ref('')
  3620. const finishedcode=ref()
  3621. const yjupdateCompanyFunc = async(row) => {
  3622. const res = await facilityProcedure({ Gd_gdbh: row['工单编号|质量信息'].substring(0, 7) })
  3623. console.log(res)
  3624. if (res.code === 0) {
  3625. selectData.value = res.data
  3626. }
  3627. console.log(row)
  3628. cpcode.value=row.产品代号
  3629. console.log(cpcode)
  3630. // console.log(row.产品代号)
  3631. finishedcode.value=row.产品代号
  3632. console.log(finishedcode.value)
  3633. }
  3634. // 删除行
  3635. const deleteCompanyFunc = async (row) => {
  3636. const res = await deleteCompany({ ID: row.ID })
  3637. if (res.code === 0) {
  3638. ElMessage({
  3639. type: 'success',
  3640. message: '删除成功'
  3641. })
  3642. if (tableData.value.length === 1 && page.value > 1) {
  3643. page.value--
  3644. }
  3645. getTableData()
  3646. }
  3647. }
  3648. //键盘 input框跳转
  3649. const ent = (event,id1,id2,id3) => {
  3650. if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
  3651. if(id3!=''){
  3652. document.getElementById(id3).focus()
  3653. }
  3654. } else if (event.keyCode === 38) { // 向上箭头
  3655. if(id1!=''){
  3656. document.getElementById(id1).focus()
  3657. }
  3658. }else if (event.keyCode === 8) { // 删除箭头
  3659. if(id1!='' && document.getElementById(id2).value===''){
  3660. document.getElementById(id1).focus()
  3661. }
  3662. }else if (event.keyCode === 37) { // 向左箭头
  3663. if(id1!='' && document.getElementById(id2).selectionStart==0){
  3664. document.getElementById(id1).focus()
  3665. }
  3666. }else if (event.keyCode === 39) { // 向右箭头
  3667. if(id3!='' && document.getElementById(id2).selectionStart == document.getElementById(id2).value.length){
  3668. document.getElementById(id3).focus()
  3669. }
  3670. }
  3671. }
  3672. // 弹窗控制标记
  3673. const dialogFormVisible = ref(false)
  3674. const dianjianVisible = ref(false)
  3675. const yinbanVisible = ref(false)
  3676. // 查看详情控制标记
  3677. const detailShow = ref(false)
  3678. const bzData = reactive([])
  3679. // 打开详情弹窗
  3680. const openDetailShow = () => {
  3681. detailShow.value = true
  3682. }
  3683. // 打开详情
  3684. const getDetails = async (row) => {
  3685. // 打开弹窗
  3686. const res = await findCompany({ ID: row.ID })
  3687. if (res.code === 0) {
  3688. formData.value = res.data.recompany
  3689. openDetailShow()
  3690. }
  3691. }
  3692. // 关闭详情弹窗
  3693. const closeDetailShow = () => {
  3694. detailShow.value = false
  3695. }
  3696. // 打开弹窗
  3697. const openDialog = () => {
  3698. // type.value = 'create'
  3699. console.log('222')
  3700. FacilityInspect()
  3701. FacilitychanLiang()
  3702. dialogFormVisible.value = true
  3703. }
  3704. let drzcData=[]
  3705. let columnNames=[]
  3706. //当日制程检验记录
  3707. const FacilityInspect = async () => {
  3708. const response = await facilityInspect({machine:JTMC,date:date});
  3709. console.log(response)
  3710. if(response.code==0){
  3711. // 提取 inspectiontime 作为列名
  3712. // Extract inspectiontime as columnNames
  3713. columnNames = response.data.InspectionTime;
  3714. // Populate drzcData with row data
  3715. for (const key in response.data.row[0]) {
  3716. if (key !== 'InspectionTime') {
  3717. const item = response.data.row[0][key];
  3718. const rowData = {
  3719. '工单编号': item['工单编号'],
  3720. '印件号': item['印件号'],
  3721. '工序名称': item['工序名称'],
  3722. '检验项目': item['检验项目']
  3723. };
  3724. // Initialize time columns with '—'
  3725. columnNames.forEach(time => {
  3726. rowData[time] = '';
  3727. });
  3728. // Split inspectresult and fill the corresponding time columns
  3729. const results = item['time'].split(',');
  3730. results.forEach(result => {
  3731. if (columnNames.includes(result)) {
  3732. rowData[result] = '√';
  3733. }else{rowData[result] = ''}
  3734. });
  3735. // Add the row data to drzcData
  3736. drzcData.push(rowData);
  3737. }
  3738. }
  3739. drzcDatas.value=drzcData
  3740. console.log(drzcData);
  3741. }
  3742. }
  3743. const FacilitychanLiang = async () => {
  3744. const response = await facilitychanLiang({machine:JTMC,date:date});
  3745. if(response.code==0){
  3746. delete response.data['totalA']
  3747. delete response.data['totalB']
  3748. gytableData.value=Object.values(response.data)
  3749. }
  3750. }
  3751. // 关闭弹窗
  3752. const closeDialog = () => {
  3753. dialogFormVisible.value = false
  3754. chanliangVisible.value=false
  3755. formData.value = {
  3756. address: '',
  3757. image: '',
  3758. name: '',
  3759. }
  3760. }
  3761. // 弹窗确定
  3762. const enterDialog = async () => {
  3763. elFormRef.value?.validate( async (valid) => {
  3764. if (!valid) return
  3765. let res
  3766. switch (type.value) {
  3767. case 'create':
  3768. res = await createCompany(formData.value)
  3769. break
  3770. case 'update':
  3771. res = await updateCompany(formData.value)
  3772. break
  3773. default:
  3774. res = await createCompany(formData.value)
  3775. break
  3776. }
  3777. if (res.code === 0) {
  3778. ElMessage({
  3779. type: 'success',
  3780. message: '创建/更改成功'
  3781. })
  3782. closeDialog()
  3783. getTableData()
  3784. }
  3785. })
  3786. }
  3787. </script>
  3788. <style>
  3789. /* .button-container {
  3790. display: flex;
  3791. flex-wrap: wrap;
  3792. } */
  3793. .button-container {
  3794. display: flex;
  3795. flex-wrap: wrap;
  3796. justify-content: flex-start; /* Align buttons from left to right */
  3797. }
  3798. .custom-button {
  3799. display: flex;
  3800. flex-direction: column;
  3801. align-items: center;
  3802. text-align: center; /* Center the text horizontally */
  3803. flex: 0 0 150px; /* Set the width of each button */
  3804. height: 170px; /* Allow the height to adjust based on content */
  3805. margin: 7px; /* Set spacing between buttons */
  3806. }
  3807. .custom-button img {
  3808. max-width: 100%; /* Ensure the image doesn't exceed the button width */
  3809. }
  3810. .JKWTree-container {
  3811. display: flex;
  3812. }
  3813. .JKWTree-tree {
  3814. width: 300px;
  3815. background-color: #fff;
  3816. padding: 10px;
  3817. margin-right: 20px;
  3818. }
  3819. .JKWTree-tree h3 {
  3820. font-size: 15px;
  3821. font-weight: 700;
  3822. margin: 10px 0;
  3823. }
  3824. .JKWTree-content {
  3825. flex: 1;
  3826. }
  3827. /* 选中某行时的背景色*/
  3828. .el-table__body tr.current-row>td {
  3829. background: #ff80ff !important;
  3830. }
  3831. .groupbox
  3832. {margin:10px;
  3833. width:500px;
  3834. height:500px;
  3835. border:thin solid black;
  3836. padding:10px}
  3837. .grouptitle
  3838. {display:block;
  3839. margin-top:-24px;
  3840. margin-left:20px;
  3841. width:150px;
  3842. text-align:center;
  3843. background-color:white}
  3844. </style>