chejianbaogong.vue 110 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193
  1. <template>
  2. <div>
  3. <header>
  4. <div style="height: 50px;">
  5. <el-button type="primary" @click="onBZ" >班组维护</el-button>
  6. <el-button type="primary" @click="onchanliang" v-if="zdtreeType === true" >日产量上报</el-button>
  7. <el-button type="primary" @click="onOver" >完工</el-button>
  8. <el-button type="primary" @click="onzhicheng" >制程检验</el-button>
  9. <el-button type="primary" @click="ondianjian" >设备点检</el-button>
  10. <el-button type="primary" @click="onxuncha" >管理巡查</el-button>
  11. <el-button type="primary" @click="onstatus" >设置机台状态</el-button>
  12. <el-button type="primary" @click="onClear" >换型清场</el-button>
  13. </div>
  14. </header>
  15. <el-container>
  16. <!-- <el-aside width="200px">
  17. <div class="JKWTree-tree">
  18. <h3 > 车间报工</h3>
  19. <el-tree :data="treeData" :props="defaultProps" :default-expand-all="true" @node-click="handleNodeClick"></el-tree>
  20. </div>
  21. </el-aside> -->
  22. <el-container>
  23. <!-- <el-header>dd</el-header>-->
  24. <el-main>
  25. <div class="gva-search-box" style="overflow: hidden; padding: 0; display: flex;">
  26. <div style="flex: 1; border: 0px magenta solid; margin: 0; padding: 0; margin-left: 20px; margin-top: 20px;">
  27. <el-form-item label="工单编号" prop="name">
  28. <el-row :gutter="24">
  29. <el-col :span="6">
  30. <el-input v-model="formData.工单编号" :clearable="true" placeholder="" />
  31. </el-col>
  32. <el-col :span="18">
  33. <el-input v-model="formData.产品名称" :clearable="true" placeholder="" />
  34. </el-col>
  35. </el-row>
  36. </el-form-item>
  37. <el-row :gutter="20">
  38. <el-col :span="6">
  39. <el-form-item label="印件编号" prop="id">
  40. <el-input v-model="formData.印件号" placeholder="" />
  41. </el-form-item>
  42. </el-col>
  43. <el-col :span="18">
  44. <el-form-item label="工序名称" prop="name">
  45. <el-input v-model="formData.工序名称" :clearable="true" placeholder="" />
  46. </el-form-item>
  47. </el-col>
  48. </el-row>
  49. <el-row :gutter="20">
  50. <el-col :span="4">
  51. <el-form-item label="班组成员" prop="id">
  52. </el-form-item>
  53. </el-col>
  54. </el-row>
  55. <el-row :gutter="1">
  56. <!-- 循环生成 el-input 组件 -->
  57. <el-col v-for="i in 6" :span="4" :key="i">
  58. <el-input v-model="formData[`sczl_bh${i}`]" :clearable="true" placeholder="" />
  59. </el-col>
  60. </el-row>
  61. <el-row :gutter="1">
  62. <!-- 循环生成 el-input 组件 -->
  63. <el-col v-for="i in 6" :span="4" :key="i">
  64. <el-input v-model="formData[`sczl_name${i}`]" :clearable="true" placeholder="" />
  65. </el-col>
  66. </el-row>
  67. </div>
  68. <div style="flex: 1; border: 0px lawngreen solid; margin: 0; padding: 0; overflow: hidden;">
  69. <el-table
  70. tooltip-effect="dark"
  71. :data="selectData"
  72. row-key="ID"
  73. highlight-current-row="true"
  74. border
  75. style="width:100%"
  76. @row-dblclick="handleSelectClick"
  77. >
  78. <el-table-column
  79. prop="Gd_cpmc"
  80. label="印件及工序"
  81. width="340"
  82. />
  83. <el-table-column
  84. prop="jyGx"
  85. label="已完成板数"
  86. width="150"
  87. />
  88. </el-table>
  89. </div>
  90. </div>
  91. <div class="gva-table-box">
  92. <el-tabs v-model="activName" type="card" @tab-click="duohandleClick" >
  93. <el-tab-pane label="设备作业清单" @click="showTable('印件资料')" name="first">
  94. <el-table ref="multipleTable"
  95. :show-overflow-tooltip="true"
  96. highlight-current-row="true"
  97. :row-style="{ height: '20px' }"
  98. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  99. :header-cell-style="{ padding: '0px' }"
  100. @row-click="yjupdateCompanyFunc"
  101. style="width: 100%;height: 330px" border tooltip-effect="dark" :data="sbzyData" row-key="ID" @selection-change="handleSelectionChange">
  102. <!-- <el-table-column type="selection" width="55" />-->
  103. <el-table-column align="left" label="选择" prop="yj_yjno" width="80"/>
  104. <el-table-column align="left" label="工单编号|质量信息" prop="工单编号|质量信息" width="180" />
  105. <el-table-column align="left" label="印件资料" prop="印件资料" width="240" />
  106. <el-table-column align="left" label="工序名称" prop="工序名称" width="100" />
  107. <el-table-column align="left" label="计划产量/已完成" prop="计划产量/已完成" width="180"/>
  108. <el-table-column align="left" label="装版时数" prop="装版时数" width="100"/>
  109. <el-table-column align="left" label="工序产能" prop="工序产能" width="100"/>
  110. <el-table-column align="left" label="计划工时" prop="计划工时" width="100"/>
  111. <el-table-column align="left" label="计划生产时段" prop="计划生产时段" width="240" />
  112. <el-table-column align="left" label="排产备注" prop="排产备注" width="100" />
  113. <el-table-column align="left" label="产品名称" prop="产品名称" width="240" />
  114. </el-table>
  115. </el-tab-pane>
  116. <el-tab-pane label="班组人员及分配比例" @click="showTable('工艺资料')" name="second">
  117. <el-table ref="multipleTable"
  118. highlight-current-row="true"
  119. :show-overflow-tooltip="true"
  120. :row-style="{ height: '20px' }"
  121. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  122. :header-cell-style="{ padding: '0px' }"
  123. @row-dblclick="gyupdateCompanyFunc"
  124. :row-class-name="rowClassStyle"
  125. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="FPData" row-key="ID" @selection-change="handleSelectionChange"
  126. @row-click="clickybupdate">
  127. <el-table-column type="selection" label="选择" width="55" />
  128. <el-table-column align="left" label="班组号" prop="班组号" width="80" />
  129. <el-table-column align="left" label="组员1" prop="0" width="240" />
  130. <el-table-column align="left" label="组员2" prop="1" width="240" />
  131. <el-table-column align="left" label="组员3" prop="2" width="240" />
  132. <el-table-column align="left" label="组员4" prop="3" width="240" />
  133. <el-table-column align="left" label="组员5" prop="4" width="100" />
  134. <el-table-column align="left" label="组员6" prop="5" width="100" />
  135. <el-table-column align="left" label="组员7" prop="6" width="100" />
  136. <el-table-column align="left" label="组员8" prop="7" width="100" />
  137. <el-table-column align="left" label="组员9" prop="8" width="100" />
  138. <el-table-column align="left" label="组员10" prop="9_正品版" width="120" />
  139. </el-table>
  140. </el-tab-pane>
  141. <el-tab-pane label="当班产量明细" @click="showsTable('印版资料')" name="third">
  142. <el-table ref="multipleTable"
  143. highlight-current-row="true"
  144. :show-overflow-tooltip="true"
  145. :row-style="{ height: '20px' }"
  146. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  147. :header-cell-style="{ padding: '0px' }"
  148. @row-dblclick="ybupdateCompanyFunc"
  149. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="CLMXData" row-key="ID" @selection-change="handleSelectionChange"
  150. >
  151. <!-- <el-table-column type="selection" width="55" />-->
  152. <el-table-column align="left" label="生产时段" prop="生产时间段" width="180"/>
  153. <el-table-column align="left" label="工单编号" prop="工单编号" width="120" />
  154. <el-table-column align="left" label="产品名称" prop="产品名称" width="240" />
  155. <el-table-column align="left" label="印件及工序" prop="印件及工序" width="320"/>
  156. <el-table-column align="left" label="标牌号" prop="标牌号" width="80"/>
  157. <el-table-column align="left" label="产量" prop="产量" width="100"/>
  158. <el-table-column align="left" label="制程废品" prop="制程废品" width="100" />
  159. <el-table-column align="left" label="制程次品" prop="制程次品" width="100" />
  160. <el-table-column align="left" label="前工序废" prop="前工序废" width="100" />
  161. <el-table-column align="left" label="来料异常" prop="来料异常" width="100"/>
  162. <el-table-column align="left" label="装版工时" prop="装版工时" width="100" />
  163. <el-table-column align="left" label="保养工时" prop="保养工时" width="100" />
  164. <el-table-column align="left" label="打样工时" prop="打样工时" width="100"/>
  165. <el-table-column align="left" label="异常停机工时" prop="异常停机工时" width="120"/>
  166. <el-table-column align="left" label="通电工时" prop="通电工时" width="100"/>
  167. <el-table-column align="left" label="码开始行" prop="码开始行" width="100" />
  168. <el-table-column align="left" label="码结束行" prop="码结束行" width="100" />
  169. <el-table-column align="left" label="码包" prop="码包" width="100" />
  170. <el-table-column align="left" label="主电表" prop="主电表" width="100"/>
  171. <el-table-column align="left" label="辅电表" prop="辅电表" width="100" />
  172. <el-table-column align="left" label="色度数" prop="色度数" width="100" />
  173. </el-table>
  174. </el-tab-pane>
  175. <el-tab-pane label="检验记录" @click="showTable('技术资料附件')" name="fourth">
  176. <el-table ref="multipleTable"
  177. :row-style="{ height: '20px' }"
  178. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  179. :header-cell-style="{ padding: '0px' }"
  180. :show-overflow-tooltip="true"
  181. highlight-current-row="true"
  182. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="JYData" row-key="ID" @selection-change="handleSelectionChange">
  183. <!-- <el-table-column type="selection" width="55" />-->
  184. <el-table-column align="left" label="工单编号" prop="工单编号" width="120"/>
  185. <el-table-column align="left" label="印件号" prop="印件号" width="120" />
  186. <el-table-column align="left" label="工序名称" prop="工序名称" width="330" />
  187. <el-table-column align="left" label="检验项目" prop="检验项目" width="120"/>
  188. <el-table-column
  189. v-for="time in columnNames"
  190. :key="time"
  191. :label="time"
  192. :prop="time"
  193. align="center"
  194. width="120"
  195. ></el-table-column>
  196. </el-table>
  197. </el-tab-pane>
  198. </el-tabs>
  199. <!-- <div class="gva-pagination">
  200. <el-pagination
  201. layout="total, sizes, prev, pager, next, jumper"
  202. :current-page="page"
  203. :page-size="pageSize"
  204. :page-sizes="[10, 30, 50, 100]"
  205. :total="total"
  206. @current-change="handleCurrentChange"
  207. @size-change="handleSizeChange"
  208. />
  209. </div> -->
  210. </div>
  211. <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type==='create'?'添加':'修改'" destroy-on-close>
  212. <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  213. <el-tab-pane label="当日上报产量" @click="showTable('工艺资料')" name="first">
  214. <el-table ref="multipleTable"
  215. :show-overflow-tooltip="true"
  216. :row-style="{ height: '20px' }"
  217. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  218. :header-cell-style="{ padding: '0px' }"
  219. highlight-current-row="true"
  220. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
  221. <el-table-column type="selection" width="55" />
  222. <el-table-column align="left" label="选择" prop="工单编号" width="100"/>
  223. <el-table-column align="left" label="产品名称" prop="重点工序" width="100"/>
  224. <el-table-column align="left" label="工序" prop="工序备注" width="240"/>
  225. <el-table-column align="left" label="备注" prop="机组" width="100"/>
  226. <el-table-column align="left" label="产量" prop="小时产能" width="100"/>
  227. <el-table-column align="left" label="千件工价" prop="生产工时" width="100"/>
  228. <el-table-column align="left" label="日定额" prop="辅助工时" width="100"/>
  229. <el-table-column align="left" label="补产标准" prop="印刷方式" width="100"/>
  230. <el-table-column align="left" label="难度系数" prop="版距" width="100"/>
  231. <el-table-column align="left" label="印刷方式" prop="创建用户" width="120"/>
  232. <el-table-column align="left" label="组员1" prop="Gy0_gxh" width="240" />
  233. <el-table-column align="left" label="组员2" prop="gy0_gxmc" width="240" />
  234. <el-table-column align="left" label="组员3" prop="add_gxmc" width="240" />
  235. <el-table-column align="left" label="组员4" prop="Gy0_Ks" width="240" />
  236. <el-table-column align="left" label="组员5" prop="Gy0_ls" width="100" />
  237. <el-table-column align="left" label="组员6" prop="备注" width="100" />
  238. <el-table-column align="left" label="组员7" prop="工价系数" width="100" />
  239. <el-table-column align="left" label="组员8" prop="损耗系数" width="100" />
  240. <el-table-column align="left" label="组员9" prop="Gy0_Ms" width="100" />
  241. <el-table-column align="left" label="组员10" prop="人工检_正品版" width="120" />
  242. <el-table-column align="left" label="制程废品" prop="Sys_id" width="100" />
  243. <el-table-column align="left" label="制程次品" prop="建档日期" width="100" />
  244. <el-table-column align="left" label="前工序废" prop="更新日期" width="100" />
  245. <el-table-column align="left" label="来料异常" prop="YB_方案" width="100"/>
  246. <el-table-column align="left" label="装版工时" prop="YB_Yjno" width="100" />
  247. <el-table-column align="left" label="保养工时" prop="印版类别" width="100" />
  248. <el-table-column align="left" label="打样工时" prop="存货编码" width="100"/>
  249. <el-table-column align="left" label="异常停机工时" prop="印版名称" width="120"/>
  250. <el-table-column align="left" label="通电工时" prop="考核印数" width="100"/>
  251. <el-table-column align="left" label="码开始行" prop="Sys_id" width="100" />
  252. <el-table-column align="left" label="码结束行" prop="建档日期" width="100" />
  253. <el-table-column align="left" label="码包" prop="更新日期" width="100" />
  254. <el-table-column align="left" label="主电表" prop="YB_方案" width="100"/>
  255. <el-table-column align="left" label="辅电表" prop="YB_Yjno" width="100" />
  256. <el-table-column align="left" label="色度数" prop="印版类别" width="100" />
  257. <el-table-column align="left" label="用户" prop="YB_Yjno" width="100" />
  258. <el-table-column align="left" label="更新时间" prop="印版类别" width="100" />
  259. </el-table>
  260. </el-tab-pane>
  261. <el-tab-pane label="当日制程检验记录" @click="showTable('印件资料')" name="second">
  262. <el-table ref="multipleTable"
  263. :row-style="{ height: '20px' }"
  264. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  265. :header-cell-style="{ padding: '0px' }"
  266. :show-overflow-tooltip="true"
  267. highlight-current-row="true"
  268. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="drzcData" row-key="ID" @selection-change="handleSelectionChange">
  269. <el-table-column type="selection" width="55" />
  270. <el-table-column align="left" label="工单编号" prop="工单编号" width="120"/>
  271. <el-table-column align="left" label="印件号" prop="印件号" width="120" />
  272. <el-table-column align="left" label="工序名称" prop="工序名称" width="330" />
  273. <el-table-column align="left" label="检验项目" prop="检验项目" width="120"/>
  274. <el-table-column
  275. v-for="time in columnNames"
  276. :key="time"
  277. :label="time"
  278. :prop="time"
  279. align="center"
  280. width="120"
  281. ></el-table-column>
  282. </el-table>
  283. </el-tab-pane>
  284. </el-tabs>
  285. </el-dialog>
  286. <el-dialog v-model="detailShow" style="width: 1000px" lock-scroll :before-close="closeDetailShow" title="机台班组维护" destroy-on-close>
  287. <el-table ref="multipleTable"
  288. :row-style="{ height: '20px' }"
  289. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  290. :header-cell-style="{ padding: '0px' }"
  291. :show-overflow-tooltip="true"
  292. highlight-current-row="true" @row-click="BZhandle"
  293. style="width: 100%;height: 250px;margin-top: 0px;" border tooltip-effect="dark"
  294. :data="bzData" row-key="ID" @selection-change="BZSelectionChange">
  295. <!-- <el-table-column type="selection" width="55" /> -->
  296. <el-table-column align="left" label="机台" prop="JTMC" width="70"/>
  297. <el-table-column align="left" label="班组" prop="班组号" width="60"/>
  298. <el-table-column align="left" label="组员1" prop="0" width="195"/>
  299. <el-table-column align="left" label="组员2" prop="1" width="195"/>
  300. <el-table-column align="left" label="组员3" prop="2" width="195"/>
  301. <el-table-column align="left" label="组员4" prop="3" width="195"/>
  302. <el-table-column align="left" label="组员5" prop="4" width="70"/>
  303. <el-table-column align="left" label="组员6" prop="5" width="70"/>
  304. <el-table-column align="left" label="组员7" prop="6" width="70"/>
  305. <el-table-column align="left" label="组员8" prop="7" width="70"/>
  306. <el-table-column align="left" label="组员9" prop="8" width="70"/>
  307. <el-table-column align="left" label="特殊组员" prop="9" width="85"/>
  308. <el-table-column align="left" label="UNIQID" prop="ID" width="75"/>
  309. </el-table>
  310. <el-row :gutter="20">
  311. <el-col :span="10">
  312. <el-form-item label="机台编号" prop="id">
  313. <el-select v-model="selectedOption" placeholder="请选择">
  314. <el-option
  315. v-for="item in dropdownOptions"
  316. :key="item.value"
  317. :label="item.label"
  318. :value="item.value"
  319. ></el-option>
  320. </el-select>
  321. </el-form-item>
  322. </el-col>
  323. <el-col :span="10">
  324. <el-form-item label="班组编号" prop="id">
  325. <el-input v-model="BZMC" :clearable="true" placeholder="" />
  326. </el-form-item>
  327. </el-col>
  328. </el-row>
  329. <div style="display: flex;">
  330. <div class="groupbox float-div" style="height: 17vh; width: 800px;">
  331. <span class="grouptitle">组员及分配比例</span>
  332. <el-row :gutter="10" style="margin-top: 0px; height: 5vh;">
  333. <el-col :span="2">
  334. <span></span>
  335. </el-col>
  336. <el-col :span="2">
  337. </el-col>
  338. <el-col :span="2">
  339. </el-col>
  340. <el-col :span="2">
  341. </el-col>
  342. <el-col :span="2">
  343. </el-col>
  344. <el-col :span="2">
  345. </el-col>
  346. <el-col :span="2">
  347. </el-col>
  348. <el-col :span="2">
  349. </el-col>
  350. <el-col :span="2">
  351. </el-col>
  352. <el-col :span="3">
  353. </el-col>
  354. <el-col :span="3">
  355. <el-form-item label="特殊组员" prop="id">
  356. </el-form-item>
  357. </el-col>
  358. </el-row>
  359. <el-row :gutter="10" style="margin-top: 0px;">
  360. <!-- <el-col :span="1">
  361. <span></span>
  362. </el-col> -->
  363. <el-col :span="3">
  364. <el-input v-model="formDatas.code1" :clearable="true" placeholder="" />
  365. </el-col>
  366. <el-col :span="3">
  367. <el-input v-model="formDatas.code2" :clearable="true" placeholder="" />
  368. </el-col>
  369. <el-col :span="3">
  370. <el-input v-model="formDatas.code3" :clearable="true" placeholder="" />
  371. </el-col>
  372. <el-col :span="3">
  373. <el-input v-model="formDatas.code4" :clearable="true" placeholder="" />
  374. </el-col>
  375. <el-col :span="3">
  376. <el-input v-model="formDatas.code5" :clearable="true" placeholder="" />
  377. </el-col>
  378. <el-col :span="3">
  379. <el-input v-model="formDatas.code6" :clearable="true" placeholder="" />
  380. </el-col>
  381. <el-col :span="3">
  382. <el-input v-model="formDatas.code7" :clearable="true" placeholder="" />
  383. </el-col>
  384. <el-col :span="3">
  385. <el-input v-model="formDatas.code8" :clearable="true" placeholder="" />
  386. </el-col>
  387. <!-- <el-col :span="2">
  388. <el-input v-model="formData.name" :clearable="true" placeholder="瞿春生" />
  389. </el-col>
  390. <el-col :span="2">
  391. <el-input v-model="percentage" :clearable="true" placeholder="11.0" />
  392. </el-col>
  393. <el-col :span="2">
  394. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="打包废纸" />
  395. </el-col>
  396. <el-col :span="2">
  397. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="是" />
  398. </el-col>
  399. <el-col :span="2">
  400. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="ZI00401" />
  401. </el-col>
  402. <el-col :span="2">
  403. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="瞿春生" />
  404. </el-col>
  405. <el-col :span="2">
  406. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  407. </el-col>
  408. <el-col :span="2">
  409. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  410. </el-col>
  411. <el-col :span="2">
  412. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  413. </el-col> -->
  414. </el-row>
  415. <el-row :gutter="10" style="margin-top: 1px;">
  416. <!-- <el-col :span="2">
  417. <span></span>
  418. </el-col> -->
  419. <el-col :span="3">
  420. <el-input v-model="formDatas.name1" :clearable="true" placeholder="" />
  421. </el-col>
  422. <el-col :span="3">
  423. <el-input v-model="formDatas.name2" :clearable="true" placeholder="" />
  424. </el-col>
  425. <el-col :span="3">
  426. <el-input v-model="formDatas.name3" :clearable="true" placeholder="" />
  427. </el-col>
  428. <el-col :span="3">
  429. <el-input v-model="formDatas.name4" :clearable="true" placeholder="" />
  430. </el-col>
  431. <el-col :span="3">
  432. <el-input v-model="formDatas.name5" :clearable="true" placeholder="" />
  433. </el-col>
  434. <el-col :span="3">
  435. <el-input v-model="formDatas.name6" :clearable="true" placeholder="" />
  436. </el-col>
  437. <el-col :span="3">
  438. <el-input v-model="formDatas.name7" :clearable="true" placeholder="" />
  439. </el-col>
  440. <el-col :span="3">
  441. <el-input v-model="formDatas.name8" :clearable="true" placeholder="" />
  442. </el-col>
  443. <!-- <el-col :span="2">
  444. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="是" />
  445. </el-col>
  446. <el-col :span="2">
  447. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="ZI00401" />
  448. </el-col>
  449. <el-col :span="2">
  450. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="瞿春生" />
  451. </el-col>
  452. <el-col :span="2">
  453. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  454. </el-col>
  455. <el-col :span="2">
  456. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  457. </el-col>
  458. <el-col :span="2">
  459. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  460. </el-col> -->
  461. </el-row>
  462. <el-row :gutter="10" style="margin-top: 1px;">
  463. <!-- <el-col :span="2">
  464. <span></span>
  465. </el-col> -->
  466. <el-col :span="3">
  467. <el-input v-model="formDatas.percentage1" :clearable="true" placeholder="" />
  468. </el-col>
  469. <el-col :span="3">
  470. <el-input v-model="formDatas.percentage2" :clearable="true" placeholder="" />
  471. </el-col>
  472. <el-col :span="3">
  473. <el-input v-model="formDatas.percentage3" :clearable="true" placeholder="" />
  474. </el-col>
  475. <el-col :span="3">
  476. <el-input v-model="formDatas.percentage4" :clearable="true" placeholder="" />
  477. </el-col>
  478. <el-col :span="3">
  479. <el-input v-model="formDatas.percentage5" :clearable="true" placeholder="" />
  480. </el-col>
  481. <el-col :span="3">
  482. <el-input v-model="formDatas.percentage6" :clearable="true" placeholder="" />
  483. </el-col>
  484. <el-col :span="3">
  485. <el-input v-model="formDatas.percentage5" :clearable="true" placeholder="" />
  486. </el-col>
  487. <el-col :span="3">
  488. <el-input v-model="formDatas.percentage6" :clearable="true" placeholder="" />
  489. </el-col>
  490. <!-- <el-col :span="2">
  491. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="是" />
  492. </el-col>
  493. <el-col :span="2">
  494. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="ZI00401" />
  495. </el-col>
  496. <el-col :span="2">
  497. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="瞿春生" />
  498. </el-col>
  499. <el-col :span="2">
  500. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  501. </el-col>
  502. <el-col :span="2">
  503. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  504. </el-col>
  505. <el-col :span="2">
  506. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  507. </el-col> -->
  508. </el-row>
  509. </div>
  510. <div style="height: 17vh; width: 100px;margin-top: 30px;">
  511. <el-button type="text"></el-button>
  512. <!-- <el-button style="margin-bottom: 5px;" @click="" >新增</el-button> -->
  513. <el-button style="margin-bottom: 5px;" @click="selectBz" >更新当前班组</el-button>
  514. <!-- <el-button @click="delBz" >删除当前班组</el-button> -->
  515. </div>
  516. </div>
  517. </el-dialog>
  518. <el-dialog
  519. v-model="dianjianVisible"
  520. title="设备点检记录"
  521. destroy-on-close
  522. width="1100px"
  523. style="height: 78%;"
  524. >
  525. <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
  526. <el-col :span="4" style="margin-bottom: 0px;margin-top: 0px;">
  527. <el-form-item label="设备编号" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
  528. <el-input v-model="JTMC" :clearable="true" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  529. </el-form-item>
  530. </el-col>
  531. <el-col :span="10" style="margin-bottom: 0px;margin-top: 0px;">
  532. <el-row style="margin-bottom: 0px;margin-top: 0px;">
  533. <el-col style="margin-bottom: 0px;margin-top: 0px;">
  534. <el-input v-model="formData.产品名称" :clearable="true" placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
  535. </el-col>
  536. </el-row>
  537. </el-col>
  538. </el-row>
  539. <div style="display: flex;">
  540. <div style="flex: 0.1;margin-top: 0px;">
  541. <el-aside width="180px" style="margin: 0; margin-top: 0px;">
  542. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  543. <el-tree :data="dianjiantreeData" :props="defaultProps" highlight-current="true"
  544. @node-click="dianjianNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
  545. </div>
  546. </el-aside>
  547. </div>
  548. <div style="flex: 1; margin: 0;">
  549. <el-table
  550. tooltip-effect="dark"
  551. :data="dianjianselectData"
  552. row-key="ID"
  553. highlight-current-row="true"
  554. :show-overflow-tooltip="true"
  555. border @row-click="dianjianhandle"
  556. style="width:100%; height:320px; margin-top: 5px;"
  557. @row-dblclick="handleSelectClick"
  558. :row-class-name="rowClassName"
  559. >
  560. <el-table-column
  561. prop="检验项目"
  562. label="检验项目"
  563. width="320"
  564. />
  565. <el-table-column
  566. prop="点检方法"
  567. label="点检方法"
  568. width="180"
  569. />
  570. <el-table-column
  571. v-slot="scope"
  572. label="正常"
  573. width="70"
  574. >
  575. <el-checkbox v-model="scope.row.zc" @click="zcClick(scope.row)"></el-checkbox>
  576. </el-table-column>
  577. <el-table-column
  578. v-slot="scope"
  579. label="异常"
  580. width="70"
  581. >
  582. <el-checkbox v-model="scope.row.yc" @click="ycClick(scope.row)"></el-checkbox>
  583. </el-table-column>
  584. <el-table-column
  585. v-slot="scope"
  586. label="备注说明"
  587. width="180"
  588. >
  589. <el-input v-model="scope.row.remark"/>
  590. </el-table-column>
  591. <el-table-column
  592. v-slot="scope"
  593. label="不检测"
  594. width="75"
  595. >
  596. <el-checkbox v-model="scope.row.notjc" @click="notjcClick(scope.row)"></el-checkbox>
  597. </el-table-column>
  598. </el-table>
  599. <el-row :gutter="24">
  600. <el-col :span="24">
  601. <el-input v-model="pandingfangfa" style="height: 50px;" :clearable="true" />
  602. </el-col>
  603. </el-row>
  604. </div>
  605. </div>
  606. <template #footer>
  607. <div class="dialog-footer">
  608. <el-button @click="closedianjianDialog">关 闭</el-button>
  609. <el-button type="primary" @click="dianjianDialog">提 交</el-button>
  610. </div>
  611. </template>
  612. </el-dialog>
  613. <el-dialog
  614. v-model="zhichengVisible"
  615. title="制程检验记录"
  616. destroy-on-close
  617. width="1100px"
  618. style="height: 78%;"
  619. >
  620. <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
  621. <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
  622. <el-form-item label="工单编号" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  623. <el-input v-model="xunchaData.order" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  624. </el-form-item>
  625. </el-col>
  626. <el-col :span="9" style="margin-top=0px; margin-bottom: 0px;">
  627. <el-row style="margin-top=0px; margin-bottom: 0px;">
  628. <el-col style="margin-top=0px; margin-bottom: 0px;">
  629. <el-input v-model="xunchaData.product_name" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  630. </el-col>
  631. </el-row>
  632. </el-col>
  633. <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
  634. <el-form-item label="流程单" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  635. <el-input v-model="xunchaData.lcdh" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  636. </el-form-item>
  637. </el-col>
  638. </el-row>
  639. <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
  640. <el-col :span="3" style="margin-top=0px; margin-bottom: 0px;">
  641. <el-form-item label="印件编号" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  642. <el-input v-model="xunchaData.yjno" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  643. </el-form-item>
  644. </el-col>
  645. <el-col :span="10" style="margin-top=0px; margin-bottom: 0px;">
  646. <el-row style="margin-top=0px; margin-bottom: 0px;">
  647. <el-col style="margin-top=0px; margin-bottom: 0px;">
  648. <el-input v-model="xunchaData.gxmc" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  649. </el-col>
  650. </el-row>
  651. </el-col>
  652. </el-row>
  653. <div style="display: flex;">
  654. <div style="flex: 0.1;">
  655. <el-aside width="180px" style="margin: 0;">
  656. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  657. <el-tree :data="zhichengtreeData" :props="defaultProps" highlight-current="true"
  658. @node-click="zhichengNodeClick"></el-tree>
  659. </div>
  660. </el-aside>
  661. </div>
  662. <div v-if="zhichengstatus" style="flex: 0; margin: 0;">
  663. <el-tabs v-model="activNames" type="card" @tab-click="handleClick">
  664. <el-tab-pane label="指标检验" @click="showTable('指标检验')" name="first">
  665. <el-table
  666. tooltip-effect="dark"
  667. :data="zhibiaoselectData"
  668. row-key="ID"
  669. highlight-current-row="true"
  670. :show-overflow-tooltip="true"
  671. border @row-click="dianjianhandle"
  672. style="width:100%; height:310px;"
  673. @row-dblclick="handleSelectClick"
  674. :row-class-name="rowClassName"
  675. >
  676. <el-table-column
  677. prop="检验项目"
  678. label="检验项目"
  679. width="270"
  680. />
  681. <el-table-column
  682. v-slot="scope"
  683. label="不检测"
  684. width="70"
  685. >
  686. <el-checkbox v-model="scope.row.notjc" @click="notjcClick(scope.row)"></el-checkbox>
  687. </el-table-column>
  688. <el-table-column
  689. v-slot="scope"
  690. label="合格"
  691. width="60"
  692. >
  693. <el-checkbox v-model="scope.row.zc" @click="zcClick(scope.row)"></el-checkbox>
  694. </el-table-column>
  695. <el-table-column
  696. v-slot="scope"
  697. label="不合格"
  698. width="70"
  699. >
  700. <el-checkbox v-model="scope.row.yc" @click="ycClick(scope.row)"></el-checkbox>
  701. </el-table-column>
  702. <el-table-column
  703. prop="检测方法"
  704. label="检测方法"
  705. width="90"
  706. />
  707. <el-table-column
  708. prop="检验频率"
  709. label="检验频率"
  710. width="150"
  711. />
  712. <el-table-column
  713. prop="相关标准"
  714. label="相关标准"
  715. width="180"
  716. />
  717. </el-table>
  718. </el-tab-pane>
  719. <el-tab-pane label="附加检验记录" @click="showTable('附加检验记录')" name="second">
  720. <el-table
  721. tooltip-effect="dark"
  722. :data="fujiaselectData"
  723. row-key="ID"
  724. highlight-current-row="true"
  725. :show-overflow-tooltip="true"
  726. border @row-click="dianjianhandle"
  727. style="width:100%; height:320px;"
  728. @row-dblclick="handleSelectClick"
  729. :row-class-name="rowClassName"
  730. >
  731. <el-table-column
  732. v-slot="scope"
  733. label="不检测"
  734. width="75"
  735. >
  736. <el-checkbox v-model="scope.row.notjc"></el-checkbox>
  737. </el-table-column>
  738. <el-table-column
  739. prop="缺陷备注"
  740. label="缺陷及记录"
  741. width="720"
  742. />
  743. <el-table-column
  744. prop="编号"
  745. label="编号"
  746. width="80"
  747. />
  748. </el-table>
  749. </el-tab-pane>
  750. </el-tabs>
  751. </div>
  752. </div>
  753. <template #footer>
  754. <div v-if="zhichengstatus" class="dialog-footer">
  755. <el-button @click="closezhichengDialog">关 闭</el-button>
  756. <el-button type="primary" @click="zhichengDialog">提 交</el-button>
  757. </div>
  758. </template>
  759. </el-dialog>
  760. <el-dialog
  761. v-model="huanxingVisible"
  762. title="换型清场"
  763. destroy-on-close
  764. width="1100px"
  765. style="height: 78%;"
  766. >
  767. <div style="display: flex;">
  768. <div style="flex: 0.1;">
  769. <el-aside width="180px" style="margin: 0;">
  770. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  771. <el-tree :data="huanxingtreeData" :props="defaultProps" highlight-current="true"
  772. @node-click="huanxingNodeClick"></el-tree>
  773. </div>
  774. </el-aside>
  775. </div>
  776. <div v-if="huanxingstatus" style="flex: 0; margin: 0;">
  777. <el-tabs v-model="activNames" type="card" @tab-click="handleClick">
  778. <el-tab-pane label="指标检验" @click="showTable('指标检验')" name="first">
  779. <el-table
  780. tooltip-effect="dark"
  781. :data="zhibiaoselectData"
  782. row-key="ID"
  783. highlight-current-row="true"
  784. :show-overflow-tooltip="true"
  785. border @row-click="dianjianhandle"
  786. style="width:100%; height:310px;"
  787. @row-dblclick="handleSelectClick"
  788. :row-class-name="rowClassName"
  789. >
  790. <el-table-column
  791. prop="检验项目"
  792. label="检验项目"
  793. width="270"
  794. />
  795. <el-table-column
  796. v-slot="scope"
  797. label="不检测"
  798. width="70"
  799. >
  800. <el-checkbox v-model="scope.row.notjc" @click="notjcClick(scope.row)"></el-checkbox>
  801. </el-table-column>
  802. <el-table-column
  803. v-slot="scope"
  804. label="合格"
  805. width="60"
  806. >
  807. <el-checkbox v-model="scope.row.zc" @click="zcClick(scope.row)"></el-checkbox>
  808. </el-table-column>
  809. <el-table-column
  810. v-slot="scope"
  811. label="不合格"
  812. width="70"
  813. >
  814. <el-checkbox v-model="scope.row.yc" @click="ycClick(scope.row)"></el-checkbox>
  815. </el-table-column>
  816. <el-table-column
  817. prop="检测方法"
  818. label="检测方法"
  819. width="90"
  820. />
  821. <el-table-column
  822. prop="检验频率"
  823. label="检验频率"
  824. width="150"
  825. />
  826. <el-table-column
  827. prop="相关标准"
  828. label="相关标准"
  829. width="180"
  830. />
  831. </el-table>
  832. </el-tab-pane>
  833. <el-tab-pane label="附加检验记录" @click="showTable('附加检验记录')" name="second">
  834. <el-table
  835. tooltip-effect="dark"
  836. :data="fujiaselectData"
  837. row-key="ID"
  838. highlight-current-row="true"
  839. :show-overflow-tooltip="true"
  840. border @row-click="dianjianhandle"
  841. style="width:100%; height:320px;"
  842. @row-dblclick="handleSelectClick"
  843. :row-class-name="rowClassName"
  844. >
  845. <el-table-column
  846. v-slot="scope"
  847. label="不检测"
  848. width="75"
  849. >
  850. <el-checkbox v-model="scope.row.notjc"></el-checkbox>
  851. </el-table-column>
  852. <el-table-column
  853. prop="缺陷备注"
  854. label="缺陷及记录"
  855. width="720"
  856. />
  857. <el-table-column
  858. prop="编号"
  859. label="编号"
  860. width="80"
  861. />
  862. </el-table>
  863. </el-tab-pane>
  864. </el-tabs>
  865. </div>
  866. </div>
  867. </el-dialog>
  868. <el-dialog
  869. v-model="xunchaVisible"
  870. title="管理人员现场巡查记录"
  871. destroy-on-close
  872. width="1200px"
  873. style="height: 78%;"
  874. >
  875. <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
  876. <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
  877. <el-form-item label="工单编号" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  878. <el-input v-model="xunchaData.order" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  879. </el-form-item>
  880. </el-col>
  881. <el-col :span="9" style="margin-top=0px; margin-bottom: 0px;">
  882. <el-row style="margin-top=0px; margin-bottom: 0px;">
  883. <el-col style="margin-top=0px; margin-bottom: 0px;">
  884. <el-input v-model="xunchaData.product_name" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  885. </el-col>
  886. </el-row>
  887. </el-col>
  888. <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
  889. <el-form-item label="工号 " prop="id" style="margin-top=0px; margin-bottom: 0px;">
  890. <el-input v-model="xunchaData.sczl_bh" @keyup.enter.native="getygsubmit($event, '11')" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  891. </el-form-item>
  892. </el-col>
  893. <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
  894. <el-form-item label="流程单" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  895. <el-input v-model="xunchaData.lcdh" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  896. </el-form-item>
  897. </el-col>
  898. </el-row>
  899. <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
  900. <el-col :span="3" style="margin-top=0px; margin-bottom: 0px;">
  901. <el-form-item label="印件编号" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  902. <el-input v-model="xunchaData.yjno" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  903. </el-form-item>
  904. </el-col>
  905. <el-col :span="10" style="margin-top=0px; margin-bottom: 0px;">
  906. <el-row style="margin-top=0px; margin-bottom: 0px;">
  907. <el-col style="margin-top=0px; margin-bottom: 0px;">
  908. <el-input v-model="xunchaData.gxmc" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  909. </el-col>
  910. </el-row>
  911. </el-col>
  912. <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
  913. <el-form-item label="姓名" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  914. <el-input v-model="xunchaData.sczl_name" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  915. </el-form-item>
  916. </el-col>
  917. </el-row>
  918. <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
  919. <el-col :span="13" style="margin-top=0px; margin-bottom: 0px;">
  920. <el-form-item label="检验备注" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  921. <el-input v-model="xunchaData.remark" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  922. </el-form-item>
  923. </el-col>
  924. </el-row>
  925. <div style="display: flex;">
  926. <div style="flex: 0.1;">
  927. <el-aside width="150px" style="margin: 0;">
  928. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  929. <el-tree :data="xunchatreeData" :props="defaultProps" highlight-current="true"
  930. @node-click="xunchaNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
  931. </div>
  932. </el-aside>
  933. </div>
  934. <div style="flex: 1; margin: 0;">
  935. <el-table
  936. tooltip-effect="dark"
  937. :data="xunchaselectData"
  938. row-key="ID"
  939. highlight-current-row="true"
  940. border @row-click="dianjianhandle"
  941. style="width:70%; height:330px;"
  942. @row-dblclick="handleSelectClick"
  943. :row-class-name="rowClassName"
  944. :show-overflow-tooltip="true"
  945. >
  946. <el-table-column
  947. prop="工单编号"
  948. label="工单编号"
  949. width="85"
  950. />
  951. <el-table-column
  952. prop="印件号"
  953. label="印件号"
  954. width="70"
  955. />
  956. <el-table-column
  957. prop="工序名称"
  958. label="工序名称"
  959. width="240"
  960. />
  961. <el-table-column
  962. prop="流程单号"
  963. label="流程单号"
  964. width="85"
  965. />
  966. <el-table-column
  967. prop="设备编号"
  968. label="设备编号"
  969. width="85"
  970. />
  971. <el-table-column
  972. prop="班组编号"
  973. label="班组编号"
  974. width="85"
  975. />
  976. <el-table-column
  977. prop="检验备注"
  978. label="检验备注"
  979. width="85"
  980. />
  981. <el-table-column
  982. prop="现场管理人员"
  983. label="现场管理人员"
  984. width="150"
  985. />
  986. <el-table-column
  987. prop="提交时间"
  988. label="提交时间"
  989. width="165"
  990. />
  991. <el-table-column
  992. prop="开工时间"
  993. label="开工时间"
  994. width="165"
  995. />
  996. <el-table-column
  997. prop="分钟差数"
  998. label="分钟差数"
  999. width="85"
  1000. />
  1001. <el-table-column
  1002. prop="归属时段"
  1003. label="归属时段"
  1004. width="165"
  1005. />
  1006. </el-table>
  1007. </div>
  1008. </div>
  1009. <template #footer>
  1010. <div class="dialog-footer">
  1011. <el-button @click="closexunchaDialog">关 闭</el-button>
  1012. <el-button type="primary" @click="xunchaDialog">提 交</el-button>
  1013. </div>
  1014. </template>
  1015. </el-dialog>
  1016. <el-dialog
  1017. v-model="chanliangVisible"
  1018. title="选择"
  1019. destroy-on-close
  1020. width="1300px"
  1021. style="height: 115%;"
  1022. >
  1023. <el-row :gutter="20">
  1024. <el-row :gutter="20">
  1025. <el-col :span="15">
  1026. <el-form-item label="工单编号" prop="id" style="margin-top: 10px;">
  1027. <el-input v-model="formData3.order" id="工单编号" @keydown="ent($event, 'rate10', '工单编号', '产品名称')" :clearable="true" placeholder="" />
  1028. </el-form-item>
  1029. </el-col>
  1030. </el-row>
  1031. <el-col :span="8">
  1032. <el-form-item label="产品名称" prop="id" style="margin-top: 10px;">
  1033. <el-input v-model="formData3.product_name" id="产品名称" @keydown="ent($event, '工单编号', '产品名称', '工序名称')" :clearable="true" placeholder="" />
  1034. </el-form-item>
  1035. </el-col>
  1036. <el-col :span="8">
  1037. <el-form-item label="工序名称" prop="id" style="margin-top: 10px;">
  1038. <el-input v-model="formData3.gxmc" id="工序名称" @keydown="ent($event, '产品名称', '工序名称', '印件号')" :clearable="true" placeholder="" />
  1039. </el-form-item>
  1040. </el-col>
  1041. <el-col :span="8">
  1042. <el-row :gutter="20">
  1043. </el-row>
  1044. </el-col>
  1045. </el-row>
  1046. <el-row :gutter="20">
  1047. <el-row :gutter="20">
  1048. <el-col :span="15">
  1049. <el-form-item label="印件号" prop="id" style="margin-top: 10px;">
  1050. <el-input v-model="formData3.yjno" id="印件号" @keydown="ent($event, '工序名称', '印件号', '印件名称')" :clearable="true" placeholder="" />
  1051. </el-form-item>
  1052. </el-col>
  1053. </el-row>
  1054. <el-col :span="8">
  1055. <el-form-item label="印件名称" prop="id" style="margin-top: 10px;">
  1056. <el-input v-model="formData3.yj_name" id="印件名称" @keydown="ent($event, '印件号', '印件名称', '工艺名称')" :clearable="true" placeholder="" />
  1057. </el-form-item>
  1058. </el-col>
  1059. <el-col :span="8">
  1060. <el-form-item label="工艺名称" prop="id" style="margin-top: 10px;">
  1061. <el-input v-model="formData3.gy_name" id="工艺名称" @keydown="ent($event, '印件名称', '工艺名称', 'gxh')" :clearable="true" placeholder="" />
  1062. </el-form-item>
  1063. </el-col>
  1064. <el-col :span="2">
  1065. <el-form-item label="" prop="id" style="margin-top: 10px;">
  1066. <el-input v-model="formData3.gxh" id="gxh" @keydown="ent($event, '工艺名称', 'gxh', '日期')" :clearable="true" placeholder="" />
  1067. </el-form-item>
  1068. </el-col>
  1069. </el-row>
  1070. <el-row :gutter="20">
  1071. <el-row :gutter="20">
  1072. <el-col :span="15">
  1073. <el-form-item label="日期" prop="id" style="margin-top: 10px;">
  1074. <el-input v-model="formData3.日期" id="日期" @keydown="ent($event, 'gxh', '日期', '流程标牌')" :clearable="true" placeholder="" />
  1075. </el-form-item>
  1076. </el-col>
  1077. </el-row>
  1078. <el-col :span="5">
  1079. <el-form-item label="流程标牌" prop="id" style="margin-top: 10px;">
  1080. <el-input v-model="formData3.流程标牌" id="流程标牌" @keydown="ent($event, '日期', '流程标牌', '上机时间')" :clearable="true" placeholder="" />
  1081. </el-form-item>
  1082. </el-col>
  1083. <el-col :span="5">
  1084. <el-form-item label="上机时间" prop="id" style="margin-top: 10px;">
  1085. <el-input v-model="formData3.上机时间" id="上机时间" @keydown="ent($event, '流程标牌', '上机时间', '下机时间')" :clearable="true" placeholder="" />
  1086. </el-form-item>
  1087. </el-col>
  1088. <el-col :span="5">
  1089. <el-form-item label="下机时间" prop="" style="margin-top: 10px;">
  1090. <el-input v-model="formData3.下机时间" id="下机时间" @keydown="ent($event, '上机时间', '下机时间', '产量')" :clearable="true" placeholder="" />
  1091. </el-form-item>
  1092. </el-col>
  1093. </el-row>
  1094. <el-row :gutter="20">
  1095. <el-col :span="3">
  1096. <el-form-item label="产量" prop="id" style="margin-top: 10px;">
  1097. <el-input v-model="formData3.产量" id="产量" @keydown="ent($event, '下机时间', '产量', '制程废品')" :clearable="true" placeholder="" />
  1098. </el-form-item>
  1099. </el-col>
  1100. <el-col :span="3">
  1101. <el-form-item label="制程废品" prop="id" style="margin-top: 10px;">
  1102. <el-input v-model="formData3.制程废品" id="制程废品" @keydown="ent($event, '产量', '制程废品', '制程次品')" :clearable="true" placeholder="" />
  1103. </el-form-item>
  1104. </el-col>
  1105. <el-col :span="3">
  1106. <el-form-item label="制程次品" prop="id" style="margin-top: 10px;">
  1107. <el-input v-model="formData3.制程次品" id="制程次品" @keydown="ent($event, '制程废品', '制程次品', '前工序废')" :clearable="true" placeholder="" />
  1108. </el-form-item>
  1109. </el-col>
  1110. <el-col :span="3">
  1111. <el-form-item label="前工序废" prop="" style="margin-top: 10px;">
  1112. <el-input v-model="formData3.前工序废" id="前工序废" @keydown="ent($event, '制程次品', '前工序废', '来料异常')" :clearable="true" placeholder="" />
  1113. </el-form-item>
  1114. </el-col>
  1115. <el-col :span="3">
  1116. <el-form-item label="来料异常" prop="" style="margin-top: 10px;">
  1117. <el-input v-model="formData3.来料异常" id="来料异常" @keydown="ent($event, '前工序废', '来料异常', '联数')" :clearable="true" placeholder="" />
  1118. </el-form-item>
  1119. </el-col>
  1120. <el-col :span="3">
  1121. <el-form-item label="联数" prop="" style="margin-top: 10px;">
  1122. <el-input v-model="formData3.联数" id="联数" @keydown="ent($event, '来料异常', '联数', '墨色')" :clearable="true" placeholder="" />
  1123. </el-form-item>
  1124. </el-col>
  1125. <el-col :span="3">
  1126. <el-form-item label="墨色" prop="" style="margin-top: 10px;">
  1127. <el-input v-model="formData3.墨色" id="墨色" @keydown="ent($event, '联数', '墨色', '装版总时长')" :clearable="true" placeholder="" />
  1128. </el-form-item>
  1129. </el-col>
  1130. </el-row>
  1131. <el-row :gutter="20">
  1132. <el-col :span="3">
  1133. <el-form-item label="装版总时长" prop="id" style="margin-top: 10px;">
  1134. <el-input v-model="formData3.装版总时长" id="装版总时长" @keydown="ent($event, '墨色', '装版总时长', '打样总工时')" :clearable="true" placeholder="" />
  1135. </el-form-item>
  1136. </el-col>
  1137. <el-col :span="3">
  1138. <el-form-item label="打样总工时" prop="id" style="margin-top: 10px;">
  1139. <el-input v-model="formData3.打样总工时" id="打样总工时" @keydown="ent($event, '装版总时长', '打样总工时', '通电工时')" :clearable="true" placeholder="" />
  1140. </el-form-item>
  1141. </el-col>
  1142. <el-col :span="3">
  1143. <el-form-item label="通电工时" prop="id" style="margin-top: 10px;">
  1144. <el-input v-model="formData3.通电工时" id="通电工时" @keydown="ent($event, '打样总工时', '通电工时', '定额代号')" :clearable="true" placeholder="" />
  1145. </el-form-item>
  1146. </el-col>
  1147. </el-row>
  1148. <el-row :gutter="20">
  1149. <el-col :span="3">
  1150. <el-form-item label="定额代号" prop="id" style="margin-top: 10px;">
  1151. <el-input v-model="formData3.定额代号" id="定额代号" @keydown="ent($event, '通电工时', '定额代号', '码包')" :clearable="true" placeholder="" />
  1152. </el-form-item>
  1153. </el-col>
  1154. <el-col :span="3">
  1155. <el-form-item label="码包" prop="id" style="margin-top: 10px;">
  1156. <el-input v-model="formData3.码包" id="码包" @keydown="ent($event, '定额代号', '码包', '主电表')" :clearable="true" placeholder="" />
  1157. </el-form-item>
  1158. </el-col>
  1159. <el-col :span="3">
  1160. <el-form-item label="主电表" prop="id" style="margin-top: 10px;">
  1161. <el-input v-model="formData3.主电表" id="主电表" @keydown="ent($event, '码包', '主电表', '辅电表')" :clearable="true" placeholder="" />
  1162. </el-form-item>
  1163. </el-col>
  1164. <el-col :span="3">
  1165. <el-form-item label="辅电表" prop="id" style="margin-top: 10px;">
  1166. <el-input v-model="formData3.辅电表" id="辅电表" @keydown="ent($event, '主电表', '辅电表', 'bzdh')" :clearable="true" placeholder="" />
  1167. </el-form-item>
  1168. </el-col>
  1169. </el-row>
  1170. <el-row :gutter="10" style="margin-top: 10px;">
  1171. <el-col :span="1">
  1172. <el-input v-model="formData3.sczl_bzdh" id="bzdh" @keydown="ent($event, '辅电表', 'bzdh', 'bh1')" :clearable="true" placeholder="ZI00401" />
  1173. </el-col>
  1174. <el-col :span="2">
  1175. <el-input v-model="formData3.sczl_bh1" id="bh1" @keydown="ent($event, 'bzdh', 'bh1', 'bh2')" @keyup.enter.native="getygsubmit($event, '1')" :clearable="true" placeholder="" />
  1176. </el-col>
  1177. <el-col :span="2">
  1178. <el-input v-model="formData3.sczl_bh2" id="bh2" @keydown="ent($event, 'bh1', 'bh2', 'bh3')" @keyup.enter.native="getygsubmit($event, '2')" :clearable="true" placeholder="" />
  1179. </el-col>
  1180. <el-col :span="2">
  1181. <el-input v-model="formData3.sczl_bh3" id="bh3" @keydown="ent($event, 'bh2', 'bh3', 'bh4')" @keyup.enter.native="getygsubmit($event, '3')" :clearable="true" placeholder="" />
  1182. </el-col>
  1183. <el-col :span="2">
  1184. <el-input v-model="formData3.sczl_bh4" id="bh4" @keydown="ent($event, 'bh3', 'bh4', 'bh5')" @keyup.enter.native="getygsubmit($event, '4')" :clearable="true" placeholder="" />
  1185. </el-col>
  1186. <el-col :span="2">
  1187. <el-input v-model="formData3.sczl_bh5" id="bh5" @keydown="ent($event, 'bh4', 'bh5', 'bh6')" @keyup.enter.native="getygsubmit($event, '5')" :clearable="true" placeholder="" />
  1188. </el-col>
  1189. <el-col :span="2">
  1190. <el-input v-model="formData3.sczl_bh6" id="bh6" @keydown="ent($event, 'bh5', 'bh6', 'bh7')" @keyup.enter.native="getygsubmit($event, '6')" :clearable="true" placeholder="" />
  1191. </el-col>
  1192. <el-col :span="2">
  1193. <el-input v-model="formData3.sczl_bh7" id="bh7" @keydown="ent($event, 'bh6', 'bh7', 'bh8')" @keyup.enter.native="getygsubmit($event, '7')" :clearable="true" placeholder="" />
  1194. </el-col>
  1195. <el-col :span="2">
  1196. <el-input v-model="formData3.sczl_bh8" id="bh8" @keydown="ent($event, 'bh7', 'bh8', 'bh9')" @keyup.enter.native="getygsubmit($event, '8')" :clearable="true" placeholder="" />
  1197. </el-col>
  1198. <el-col :span="2">
  1199. <el-input v-model="formData3.sczl_bh9" id="bh9" @keydown="ent($event, 'bh8', 'bh9', 'bh10')" @keyup.enter.native="getygsubmit($event, '9')" :clearable="true" placeholder="" />
  1200. </el-col>
  1201. <el-col :span="2">
  1202. <el-input v-model="formData3.sczl_bh10" id="bh10" @keydown="ent($event, 'bh9', 'bh10', 'bh11')" @keyup.enter.native="getygsubmit($event, '10')" :clearable="true" placeholder="" />
  1203. </el-col>
  1204. <el-col :span="2">
  1205. <el-input v-model="formData3.sczl_bhll" id="bh11" @keydown="ent($event, 'bh10', 'bh11', 'name1')" @keyup.enter.native="getygsubmit($event, '11')" :clearable="true" placeholder="" />
  1206. </el-col>
  1207. </el-row>
  1208. <el-row :gutter="10" style="margin-top: 10px;">
  1209. <el-col :span="1">
  1210. </el-col>
  1211. <el-col :span="2">
  1212. <el-input v-model="formData3.sczl_name1" id="name1" @keydown="ent($event, 'bh11', 'name1', 'name2')" :clearable="true" placeholder="" />
  1213. </el-col>
  1214. <el-col :span="2">
  1215. <el-input v-model="formData3.sczl_name2" id="name2" @keydown="ent($event, 'name1', 'name2', 'name3')" :clearable="true" placeholder="" />
  1216. </el-col>
  1217. <el-col :span="2">
  1218. <el-input v-model="formData3.sczl_name3" id="name3" @keydown="ent($event, 'name2', 'name3', 'name4')" :clearable="true" placeholder="" />
  1219. </el-col>
  1220. <el-col :span="2">
  1221. <el-input v-model="formData3.sczl_name4" id="name4" @keydown="ent($event, 'name3', 'name4', 'name5')" :clearable="true" placeholder="" />
  1222. </el-col>
  1223. <el-col :span="2">
  1224. <el-input v-model="formData3.sczl_name5" id="name5" @keydown="ent($event, 'name4', 'name5', 'name6')" :clearable="true" placeholder="" />
  1225. </el-col>
  1226. <el-col :span="2">
  1227. <el-input v-model="formData3.sczl_name6" id="name6" @keydown="ent($event, 'name5', 'name6', 'name7')" :clearable="true" placeholder="" />
  1228. </el-col>
  1229. <el-col :span="2">
  1230. <el-input v-model="formData3.sczl_name7" id="name7" @keydown="ent($event, 'name6', 'name7', 'name8')" :clearable="true" placeholder="" />
  1231. </el-col>
  1232. <el-col :span="2">
  1233. <el-input v-model="formData3.sczl_name8" id="name8" @keydown="ent($event, 'name7', 'name8', 'name9')" :clearable="true" placeholder="" />
  1234. </el-col>
  1235. <el-col :span="2">
  1236. <el-input v-model="formData3.sczl_name9" id="name9" @keydown="ent($event, 'name8', 'name9', 'name10')" :clearable="true" placeholder="" />
  1237. </el-col>
  1238. <el-col :span="2">
  1239. <el-input v-model="formData3.sczl_name10" id="name10" @keydown="ent($event, 'name9', 'name10', 'name11')" :clearable="true" placeholder="" />
  1240. </el-col>
  1241. <el-col :span="2">
  1242. <el-input v-model="formData3.llname" id="name11" @keydown="ent($event, 'name10', 'name11', 'rate1')" :clearable="true" placeholder="" />
  1243. </el-col>
  1244. </el-row>
  1245. <el-row :gutter="10" style="margin-top: 10px;">
  1246. <el-col :span="1">
  1247. </el-col>
  1248. <el-col :span="2">
  1249. <el-input v-model="formData3.sczl_rate1" id="rate1" @keydown="ent($event, 'name11', 'rate1', 'rate2')" :clearable="true" placeholder="" />
  1250. </el-col>
  1251. <el-col :span="2">
  1252. <el-input v-model="formData3.sczl_rate2" id="rate2" @keydown="ent($event, 'rate1', 'rate2', 'rate3')" :clearable="true" placeholder="" />
  1253. </el-col>
  1254. <el-col :span="2">
  1255. <el-input v-model="formData3.sczl_rate3" id="rate3" @keydown="ent($event, 'rate2', 'rate3', 'rate4')" :clearable="true" placeholder="" />
  1256. </el-col>
  1257. <el-col :span="2">
  1258. <el-input v-model="formData3.sczl_rate4" id="rate4" @keydown="ent($event, 'rate3', 'rate4', 'rate5')" :clearable="true" placeholder="" />
  1259. </el-col>
  1260. <el-col :span="2">
  1261. <el-input v-model="formData3.sczl_rate5" id="rate5" @keydown="ent($event, 'rate4', 'rate5', 'rate6')" :clearable="true" placeholder="" />
  1262. </el-col>
  1263. <el-col :span="2">
  1264. <el-input v-model="formData3.sczl_rate6" id="rate6" @keydown="ent($event, 'rate5', 'rate6', 'rate7')" :clearable="true" placeholder="" />
  1265. </el-col>
  1266. <el-col :span="2">
  1267. <el-input v-model="formData3.sczl_rate7" id="rate7" @keydown="ent($event, 'rate6', 'rate7', 'rate8')" :clearable="true" placeholder="" />
  1268. </el-col>
  1269. <el-col :span="2">
  1270. <el-input v-model="formData3.sczl_rate8" id="rate8" @keydown="ent($event, 'rate7', 'rate8', 'rate9')" :clearable="true" placeholder="" />
  1271. </el-col>
  1272. <el-col :span="2">
  1273. <el-input v-model="formData3.sczl_rate9" id="rate9" @keydown="ent($event, 'rate8', 'rate9', 'rate10')" :clearable="true" placeholder="" />
  1274. </el-col>
  1275. <el-col :span="2">
  1276. <el-input v-model="formData3.sczl_rate10" id="rate10" @keydown="ent($event, 'rate9', 'rate10', '工单编号')" :clearable="true" placeholder="" />
  1277. </el-col>
  1278. <el-col :span="2">
  1279. </el-col>
  1280. </el-row>
  1281. <el-table
  1282. tooltip-effect="dark"
  1283. :data="chanliangselectData"
  1284. row-key="ID"
  1285. highlight-current-row="true"
  1286. border
  1287. style="width:100%"
  1288. height="400px"
  1289. @row-dblclick="batchaddSelectClick"
  1290. :selectable="row => rowSelectable(row)"
  1291. @selection-change="chanliangSelectionChange"
  1292. >
  1293. <el-table-column type="selection" width="55" align="center" label=""></el-table-column>
  1294. <el-table-column
  1295. prop="batch"
  1296. label="物料编号"
  1297. width="150"
  1298. />
  1299. <el-table-column
  1300. prop="BOM_物料名称"
  1301. label="物料名称"
  1302. width="400"
  1303. />
  1304. <el-table-column
  1305. prop="采购单号"
  1306. label="采购单号"
  1307. width="150"
  1308. />
  1309. <el-table-column
  1310. prop="st_wlbh"
  1311. label="供方批次"
  1312. width="400"
  1313. />
  1314. <el-table-column
  1315. prop="卷号"
  1316. label="卷号"
  1317. width="150"
  1318. />
  1319. <el-table-column
  1320. prop="Uniqid"
  1321. label="UniqID"
  1322. width="150"
  1323. />
  1324. </el-table>
  1325. <!-- </el-scrollbar> -->
  1326. <template #footer>
  1327. <div class="dialog-footer">
  1328. <el-button @click="closeDialog">取 消</el-button>
  1329. <el-button type="primary" @click="chanliangenterDialog">确 定</el-button>
  1330. </div>
  1331. </template>
  1332. </el-dialog>
  1333. <el-dialog
  1334. v-model="ClearVisible"
  1335. title="选择"
  1336. destroy-on-close
  1337. width="1300px"
  1338. style="height: 115%;"
  1339. >
  1340. <div style="display: flex;">
  1341. <div style="flex: 1;">
  1342. <el-aside width="250px" style="margin: 0;">
  1343. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  1344. <el-tree :data="CleartreeData" :props="defaultProps" highlight-current="true"
  1345. @node-click="ClearNodeClick" @node-dblclick="ClearDoubleClick"></el-tree>
  1346. </div>
  1347. </el-aside>
  1348. </div>
  1349. <div style="flex: 1; margin: 0;">
  1350. <el-tabs v-model="activeName" type="card" @tab-click="duohandleClick" >
  1351. <el-tab-pane label="换型清场明细信息" @click="showTable('印件资料')" name="first">
  1352. </el-tab-pane>
  1353. <el-tab-pane label="当前设备换型记录" @click="showTable('工艺资料')" name="second">
  1354. <el-table ref="multipleTable"
  1355. highlight-current-row="true"
  1356. :show-overflow-tooltip="true"
  1357. :row-style="{ height: '20px' }"
  1358. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  1359. :header-cell-style="{ padding: '0px' }"
  1360. @row-dblclick="gyupdateCompanyFunc"
  1361. :row-class-name="rowClassStyle"
  1362. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="ClearData" row-key="ID" @selection-change="handleSelectionChange"
  1363. @row-click="clickybupdate">
  1364. <el-table-column type="selection" label="选择" width="55" />
  1365. <el-table-column align="left" label="日期" prop="班组号" width="80" />
  1366. <el-table-column align="left" label="机台编号" prop="0" width="240" />
  1367. <el-table-column align="left" label="班组" prop="1" width="240" />
  1368. <el-table-column align="left" label="工单编号A" prop="2" width="240" />
  1369. <el-table-column align="left" label="印件名称A" prop="3" width="240" />
  1370. <el-table-column align="left" label="印件工序A" prop="4" width="100" />
  1371. <el-table-column align="left" label="码包号A" prop="5" width="100" />
  1372. <el-table-column align="left" label="工单编号B" prop="6" width="100" />
  1373. <el-table-column align="left" label="印件名称B" prop="7" width="100" />
  1374. <el-table-column align="left" label="印件工序B" prop="8" width="100" />
  1375. <el-table-column align="left" label="码包号B" prop="9_正品版" width="120" />
  1376. <el-table-column align="left" label="菲林_标样_签样品_留样品" prop="6" width="100" />
  1377. <el-table-column align="left" label="板材_纸张_电化铝_油墨" prop="7" width="100" />
  1378. <el-table-column align="left" label="过版纸_废品_次品" prop="8" width="100" />
  1379. <el-table-column align="left" label="半成品_成品_零头" prop="9_正品版" width="120" />
  1380. <el-table-column align="left" label="操作台桌面_抽屉_地面" prop="8" width="100" />
  1381. <el-table-column align="left" label="机长" prop="9_正品版" width="120" />
  1382. <el-table-column align="left" label="带班长" prop="6" width="100" />
  1383. <el-table-column align="left" label="质量巡查员" prop="7" width="100" />
  1384. <el-table-column align="left" label="创建时间" prop="8" width="100" />
  1385. <el-table-column align="left" label="UNIQID" prop="9_正品版" width="120" />
  1386. </el-table>
  1387. </el-tab-pane>
  1388. </el-tabs>
  1389. </div>
  1390. </div>
  1391. <!-- </el-scrollbar> -->
  1392. <template #footer>
  1393. <div class="dialog-footer">
  1394. <el-button @click="closeDialog">取 消</el-button>
  1395. <el-button type="primary" @click="chanliangenterDialog">确 定</el-button>
  1396. </div>
  1397. </template>
  1398. </el-dialog>
  1399. <Shebeizhuangtai
  1400. v-if="dialogSbyxgl"
  1401. v-model="dialogSbyxgl"
  1402. title="【01.30 08:30】【JY01#--海德堡对开八色平版胶印机(JY08-01)】【2311116-->钻石(荷花)盒包装纸】【01--胶印】"
  1403. :formData="formData"
  1404. />
  1405. </el-main>
  1406. </el-container>
  1407. </el-container>
  1408. </div>
  1409. </template>
  1410. <script setup>
  1411. import {
  1412. createCompany,
  1413. deleteCompany,
  1414. deleteCompanyByIds,
  1415. updateCompany,
  1416. findCompany,
  1417. getCompanyList
  1418. } from '@/api/company'
  1419. import {
  1420. ProcessInspectionRecordsItemAdd,
  1421. AdditionalInspectionRecordAdd,
  1422. getMac,
  1423. remodelGetTab,
  1424. setMachineTeam
  1425. } from '@/api/jixiaoguanli/baogong'
  1426. import {
  1427. facilityTab,
  1428. facilitychanLiang,
  1429. facilityInspect,
  1430. facilityProduction,
  1431. facilityTeam,
  1432. facilityMachineList,
  1433. facilitySpotCheckItem,
  1434. facilityInspectionItem,
  1435. reportProduceInfo,
  1436. reportName,
  1437. reportInfo,
  1438. reportMachineMac,
  1439. facilityWorklist,
  1440. setProcessStatus,
  1441. submitDailyProduction,
  1442. facilityDetail,
  1443. inspectionRecord,
  1444. getYg,
  1445. submitPatrolRecord,
  1446. getMachineMac,
  1447. setMachineStatus,
  1448. fieldInspectionRecord,
  1449. InspectionItemAdd,
  1450. ProcessInspectionRecordsItem,
  1451. MachineDetailList
  1452. } from '@/api/jixiaoguanli/jitairibaobiao'
  1453. import {
  1454. demoCustomer
  1455. } from "@/api/demo";
  1456. // 全量引入格式化工具 请按需保留
  1457. import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
  1458. import { ElMessage, ElMessageBox } from 'element-plus'
  1459. import { ref, reactive } from 'vue'
  1460. import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue'
  1461. const dialogSbyxgl=ref(false)
  1462. const zhichengstatus=ref(false)
  1463. defineOptions({
  1464. name: 'Company'
  1465. })
  1466. const xunchatreeData=ref([{label: '现场巡查记录',} ])
  1467. const activName=ref('first')
  1468. const activNames=ref('first')
  1469. let checked3=ref(false)
  1470. const detailData = reactive([])
  1471. const treeData=ref([])
  1472. const huanxingtreeData=ref([])
  1473. const zhichengtreeData=ref([{
  1474. label: '首件与过程确认'
  1475. },{
  1476. label: '机台检验'
  1477. },{
  1478. label: 'IPQC检验'
  1479. }])
  1480. let dianjiantreeData;
  1481. let JTMC=ref()
  1482. let CJMC=ref()
  1483. const sbzyData = reactive([])
  1484. const FPData = reactive([])
  1485. const CLMXData = reactive([])
  1486. let JYData = reactive([])
  1487. //键盘 input框跳转
  1488. const ent = (event,id1,id2,id3) => {
  1489. if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
  1490. const idMap = {
  1491. 'bh1': '1',
  1492. 'bh2': '2',
  1493. 'bh3': '3',
  1494. 'bh4': '4',
  1495. 'bh5': '5',
  1496. 'bh6': '6',
  1497. 'bh7': '7',
  1498. 'bh8': '8',
  1499. 'bh9': '9',
  1500. 'bh10': '10',
  1501. 'bh11': '11',
  1502. };
  1503. if (idMap.hasOwnProperty(id2) && event.keyCode === 13) {
  1504. getygsubmit('', idMap[id2]);
  1505. }else if(id3!=''){
  1506. document.getElementById(id3).focus()
  1507. }
  1508. } else if (event.keyCode === 38) { // 向上箭头
  1509. if(id1!=''){
  1510. document.getElementById(id1).focus()
  1511. }
  1512. }else if (event.keyCode === 8) { // 删除箭头
  1513. if(id1!='' && document.getElementById(id2).value==''){
  1514. document.getElementById(id1).focus()
  1515. }
  1516. console.log(document.getElementById(id2).value)
  1517. }else if (event.keyCode === 37) { // 向左箭头
  1518. if(id1!='' && document.getElementById(id2).selectionStart==0){
  1519. document.getElementById(id1).focus()
  1520. }
  1521. }else if (event.keyCode === 39) { // 向右箭头
  1522. if(id3!='' && document.getElementById(id2).selectionStart == document.getElementById(id2).value.length){
  1523. document.getElementById(id3).focus()
  1524. }
  1525. }
  1526. }
  1527. const handleNodeClick = (nodeData,node) => {
  1528. //存放当前节点的nodeId
  1529. if(nodeData.level === 1){
  1530. console.log('1')
  1531. }else{
  1532. console.log('2')
  1533. }
  1534. // if (nodeData.level === 1) {
  1535. // console.log(node.label); // 第一级节点
  1536. // } else if (nodeData.level === 2) {
  1537. // console.log(node.label); // 第二级节点
  1538. // JTMC=node.label.split("【")[0]
  1539. // FacilityProduction()
  1540. // FacilityWorklist()
  1541. // FacilityTeam(JTMC)
  1542. // // InspectionRecord()
  1543. // // FacilityDetail()
  1544. // // ReportProduceInfo()
  1545. // console.log(JTMC)
  1546. // } else if (nodeData.level === 3) {
  1547. // console.log(node.label); // 第三级节点
  1548. // }
  1549. // JTMC=node.label.split("【")[0]
  1550. // FacilityProduction()
  1551. // console.log(node.label)
  1552. }
  1553. //当前生产订单
  1554. // const formDatabz = reactive({
  1555. // sczl_bh12: [],
  1556. // sczl_name12: [],
  1557. // });
  1558. const classbz=ref([])
  1559. const FacilityProduction = async () => {
  1560. const response = await facilityProduction({machine:JTMC});
  1561. if (response.code === 0) {
  1562. formData.value.工单编号 = response.data.工单编号;
  1563. formData.value.印件号 = response.data.印件号;
  1564. formData.value.工序号 = response.data.工序名称.substring(0,2);
  1565. formData.value.工序名称 = response.data.工序名称;
  1566. formData.value.产品名称 = response.data.产品名称;
  1567. formData.value.班组Id=response.data.班组Id
  1568. formData.value.machine=JTMC
  1569. formData.value.状态=response.data.状态
  1570. BZMC.value=response.data.班组编号
  1571. // 填充sczl_bh和sczl_name字段
  1572. let sczl_bhkey=''
  1573. let sczl_namekey=''
  1574. if (response.data.班组成员) {
  1575. for (let i = 1; i <= Math.min(Object.keys(response.data.班组成员).length, 6); i++) {
  1576. sczl_bhkey=`sczl_bh${i}`
  1577. sczl_namekey=`sczl_name${i}`
  1578. formData.value[sczl_bhkey] = response.data.班组成员[i]['编号'];
  1579. formData.value[sczl_namekey] = response.data.班组成员[i]['姓名'];
  1580. classbz.value[i-1]=response.data.班组成员[i]['编号']
  1581. }
  1582. }
  1583. formData.value.class=classbz.value.join(',')
  1584. // for (let i = 1; i <= 10; i++) {
  1585. // if (response.data.班组成员) {
  1586. // // formData.value.['sczl_bh12'] = response.data.班组成员[i]['编号'];
  1587. // // formData.value['sczl_name12'] = response.data.班组成员[i]['名字'];
  1588. // // console.log(formData)
  1589. // // console.log(response.data[sczl_bh]['员工姓名'])
  1590. // // console.log(formData.value.sczl_bh)
  1591. // // console.log(sczl_name)
  1592. // } else {
  1593. // console.log(555555555555555)
  1594. // // 如果字段不存在,可以在这里进行处理
  1595. // // console.log('2');
  1596. // // formData.value[sczl_bh] = response.data[sczl_bh]['员工编号'];
  1597. // // formData.value[sczl_name] = response.data[sczl_bh]['员工姓名'];
  1598. // // console.log(formData.value.sczl_bh)
  1599. // // console.log(sczl_name)
  1600. // }
  1601. // }
  1602. const responses = await MachineDetailList({workshop:CJMC});
  1603. if(responses.code===0){
  1604. responses.data.map(item=>{
  1605. if(item.设备编号==JTMC){
  1606. formData.value.status=item.状态
  1607. }
  1608. })
  1609. }
  1610. FacilityWorklist()
  1611. FacilityTeam(JTMC)
  1612. InspectionRecord()
  1613. FacilityDetail()
  1614. }
  1615. }
  1616. //设备工作清单
  1617. const FacilityWorklist = async () => {
  1618. const response = await facilityWorklist({machine:JTMC});
  1619. if (response.code === 0) {
  1620. // console.log(response)
  1621. sbzyData.splice(0, sbzyData.length, ...response.data);
  1622. }
  1623. }
  1624. //检验记录
  1625. const InspectionRecord = async () => {
  1626. const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2312191',team:'A班'});
  1627. if(response.code==0){
  1628. // 提取 inspectiontime 作为列名
  1629. // Extract inspectiontime as columnNames
  1630. columnNames = response.data.inspectiontime;
  1631. // Populate drzcData with row data
  1632. for (const key in response.data) {
  1633. if (key !== 'inspectiontime') {
  1634. const item = response.data[key];
  1635. const rowData = {
  1636. '工单编号': item['工单编号'],
  1637. '印件号': item['印件号'],
  1638. '工序名称': item['工序名称'],
  1639. '检验项目': item['检验项目']
  1640. };
  1641. // Initialize time columns with '—'
  1642. columnNames.forEach(time => {
  1643. rowData[time] = '';
  1644. });
  1645. // Split inspectresult and fill the corresponding time columns
  1646. const results = item['inspectresult'].split(',');
  1647. results.forEach(result => {
  1648. if (columnNames.includes(result)) {
  1649. rowData[result] = '√';
  1650. }else{rowData[result] = ''}
  1651. });
  1652. // Add the row data to drzcData
  1653. JYData.push(rowData);
  1654. }
  1655. }
  1656. console.log(JYData);
  1657. }
  1658. }
  1659. //当班产量明细
  1660. const FacilityDetail = async () => {
  1661. const response = await facilityDetail({ machine: JTMC, Gd_gdbh: '2311114', team:'A班' });
  1662. if (response.code === 0) {
  1663. CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
  1664. formData.value.production_now=response.data[0].产量
  1665. formData.value.production_all=response.data.total.产量
  1666. }
  1667. };
  1668. //员工编号回车事件
  1669. const getygsubmit = (event, inputName) => {
  1670. console.log(inputName)
  1671. let combinedString = 'sczl_bh' + inputName;
  1672. console.log(combinedString)
  1673. // let variableName = 'sczl_gdbh'+inputName;
  1674. let variableValue = eval('formData3.value.' + combinedString);
  1675. console.log(variableValue)
  1676. GetYg(variableValue,inputName)
  1677. }
  1678. //获取员工信息
  1679. const GetYg = async (value,inputName) => {
  1680. const response = await getYg({sczl_bh:value});
  1681. console.log(response)
  1682. if (response.code === 0) {
  1683. console.log(response.data.ygxm)
  1684. let Bname = 'sczl_name' + inputName;
  1685. formData3.value[Bname]=response.data.ygxm
  1686. // console.log(formData.value[Bname])
  1687. }
  1688. }
  1689. // 验证规则
  1690. const rule = reactive({
  1691. })
  1692. const searchRule = reactive({
  1693. createdAt: [
  1694. { validator: (rule, value, callback) => {
  1695. if (searchInfo.value.startCreatedAt && !searchInfo.value.endCreatedAt) {
  1696. callback(new Error('请填写结束日期'))
  1697. } else if (!searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt) {
  1698. callback(new Error('请填写开始日期'))
  1699. } else if (searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt && (searchInfo.value.startCreatedAt.getTime() === searchInfo.value.endCreatedAt.getTime() || searchInfo.value.startCreatedAt.getTime() > searchInfo.value.endCreatedAt.getTime())) {
  1700. callback(new Error('开始日期应当早于结束日期'))
  1701. } else {
  1702. callback()
  1703. }
  1704. }, trigger: 'change' }
  1705. ],
  1706. })
  1707. const elFormRef = ref()
  1708. const elSearchFormRef = ref()
  1709. // =========== 表格控制部分 ===========
  1710. const page = ref(1)
  1711. const total = ref(0)
  1712. const pageSize = ref(10)
  1713. const tableData = ref([])
  1714. const zhibiaoselectData=ref([])
  1715. const fujiaselectData=ref([])
  1716. const searchInfo = ref({})
  1717. // 重置
  1718. const onReset = () => {
  1719. searchInfo.value = {}
  1720. getTableData()
  1721. }
  1722. // 搜索
  1723. const onSubmit = () => {
  1724. elSearchFormRef.value?.validate(async(valid) => {
  1725. if (!valid) return
  1726. page.value = 1
  1727. pageSize.value = 10
  1728. getTableData()
  1729. })
  1730. }
  1731. // 分页
  1732. const handleSizeChange = (val) => {
  1733. pageSize.value = val
  1734. getTableData()
  1735. }
  1736. // 修改页面容量
  1737. const handleCurrentChange = (val) => {
  1738. page.value = val
  1739. getTableData()
  1740. }
  1741. const getTableData = async () => {
  1742. const response = await facilityTab();
  1743. if (response.code === 0 && response.data) {
  1744. const workshops = response.data; // 车间数据
  1745. // 在推送新项之前将 treeData 重置为空数组
  1746. treeData.value = []; // 使用 .value 访问响应式引用的值
  1747. for (const workshopName in workshops) {
  1748. const workshopNode = {
  1749. label: workshopName,
  1750. children: [],
  1751. level: 1 // 添加层级属性
  1752. };
  1753. const machines = workshops[workshopName]; // 车间下的机器
  1754. for (const machineName in machines) {
  1755. const machineNode = {
  1756. label: machineName,
  1757. children: [],
  1758. level: 2, // 添加层级属性
  1759. parentNode: workshopNode
  1760. };
  1761. // Now that machineNode is initialized, you can refer to it
  1762. const childrenNodes = machines[machineName].map(dateTime => {
  1763. const dateOnly = dateTime.split(' ')[0];
  1764. return {
  1765. label: dateOnly,
  1766. level: 3, // 添加层级属性
  1767. parentNode: machineNode
  1768. };
  1769. });
  1770. // Assign the childrenNodes to the machineNode's children property
  1771. machineNode.children = childrenNodes;
  1772. // Finally, push the machineNode to the workshopNode's children array
  1773. workshopNode.children.push(machineNode);
  1774. }
  1775. // 将 workshopNode 推送到响应式 treeData 数组
  1776. treeData.value.push(workshopNode);
  1777. }
  1778. }
  1779. };
  1780. // 查询
  1781. const getTableList = async() => {
  1782. const table = await getCompanyList({ page: page.value, pageSize: pageSize.value, ...searchInfo.value })
  1783. if (table.code === 0) {
  1784. tableData.value = table.data.list
  1785. total.value = table.data.total
  1786. page.value = table.data.page
  1787. pageSize.value = table.data.pageSize
  1788. }
  1789. }
  1790. // getTableData()
  1791. //删除
  1792. function onDel() {
  1793. }
  1794. //完工
  1795. function onOver() {
  1796. SetProcessStatus()
  1797. FacilityProduction()
  1798. }
  1799. //完工事件
  1800. const SetProcessStatus = async () => {
  1801. const RESCODE={
  1802. order:'2311114',
  1803. yjno:'01',
  1804. gxh:'01',
  1805. }
  1806. console.log(formData.value.工单编号,formData.value.印件号,formData.value.工序号)
  1807. const response = await setProcessStatus({order:formData.value.工单编号,yjno:formData.value.印件号,gxh:formData.value.工序号});
  1808. if (response.code === 0) {
  1809. }
  1810. console.log(response)
  1811. }
  1812. import { nextTick } from 'vue';
  1813. //设备点检
  1814. function ondianjian() {
  1815. getSpotCheckItem(JTMC).then(treeData => {
  1816. if (treeData) {
  1817. // 如果获取成功,treeData 就是我们需要的树形结构数据
  1818. dianjiantreeData = treeData;
  1819. console.log('222');
  1820. console.log(dianjiantreeData);
  1821. // 使用 nextTick 来确保在更新 dianjianVisible 后立即刷新视图
  1822. nextTick(() => {
  1823. dianjianVisible.value = true;
  1824. });
  1825. // 这里可以处理treeData,例如将其赋值给某个状态管理变量或者用于渲染界面
  1826. } else {
  1827. // 如果获取失败,则treeData为null
  1828. console.log('获取巡检项目树形结构数据失败');
  1829. }
  1830. });
  1831. }
  1832. const onzhicheng = async () => {
  1833. zhichengstatus.value=false
  1834. xunchaData.value=[]
  1835. const response = await reportProduceInfo({machine:JTMC.split("#")[0]});
  1836. if (response.code === 0) {
  1837. xunchaData.value.order=response.data.order
  1838. xunchaData.value.yjno=response.data.yjno
  1839. xunchaData.value.product_name=response.data.product_name
  1840. xunchaData.value.gxmc=response.data.gxmc
  1841. xunchaData.value.lcdh=0
  1842. xunchaData.value.sczl_bh=''
  1843. xunchaData.value.sczl_name=''
  1844. xunchaData.value.remark=''
  1845. zhichengVisible.value = true;
  1846. }
  1847. }
  1848. const chanliangselectData = reactive([])
  1849. const chanliangVisible = ref(false)
  1850. const huanxingVisible = ref(false)
  1851. const xunchaVisible = ref(false)
  1852. //设置机台状态
  1853. function onstatus() {
  1854. dialogSbyxgl.value=true
  1855. SetMachineStatus()
  1856. // ReportProduceInfo()
  1857. }
  1858. function onClear() {
  1859. huanxingVisible.value=true
  1860. RemodelGetTab()
  1861. }
  1862. const RemodelGetTab = async() => {
  1863. const response = await remodelGetTab()
  1864. let arr=[]
  1865. if (response.code === 0) {
  1866. for(let key in response.data){
  1867. if(response.data[key][0]){
  1868. let children =[]
  1869. for (let i = 0; i < response.data[key].length; i++) {
  1870. children.push({label:response.data[key][i]})
  1871. }
  1872. arr.push({
  1873. label:key,
  1874. children:children
  1875. })
  1876. console.log(response.data[key].length)
  1877. }else{
  1878. arr.push({label:key})
  1879. }
  1880. }
  1881. huanxingtreeData.value=arr
  1882. }
  1883. }
  1884. //设置机台状态
  1885. const SetMachineStatus = async () => {
  1886. // const response = await setMachineStatus({
  1887. // machine:'JY03',
  1888. // gy_name:'02-胶印〖白、黑、哑油【预干】、NT光油',
  1889. // order:'2311114',
  1890. // yjno:'1',
  1891. // class:'ZM00545,ZM01351,ZM01170',
  1892. // status:'维修',
  1893. // production_now:'',
  1894. // production_all:'',
  1895. // });
  1896. // if (response.code === 0) {
  1897. // }
  1898. }
  1899. //提交巡查记录
  1900. function onxuncha() {
  1901. xunchaData.value=[]
  1902. ReportProduceInfo()
  1903. }
  1904. //巡检弹窗确定
  1905. const xunchaDialog = async () => {
  1906. SubmitPatrolRecord()
  1907. }
  1908. const closexunchaDialog = async () => {
  1909. xunchaVisible.value=false
  1910. }
  1911. const dianjianDialog = async () => {
  1912. dianjianselectData.splice(0, dianjianselectData.length, ...dianjianselectData.map(item=>{
  1913. if(item.zc==true){
  1914. item.status='正常'
  1915. }
  1916. if(item.yc==true){
  1917. item.status='异常'
  1918. }
  1919. if(item.notjc==true){
  1920. item.status='不检测'
  1921. }
  1922. item.itemName=item.检验项目
  1923. item.method=item.点检方法
  1924. item.standard=item.判定标准
  1925. delete item.notjc
  1926. delete item.zc
  1927. delete item.yc
  1928. delete item.检验项目
  1929. delete item.点检方法
  1930. delete item.判定标准
  1931. return item
  1932. }))
  1933. const response = await InspectionItemAdd(dianjianselectData);
  1934. if (response.code === 0) {
  1935. ElMessage({
  1936. type: 'success',
  1937. message: '成功'
  1938. })
  1939. dianjianVisible.value=false
  1940. }
  1941. }
  1942. const zhichengDialog = async () => {
  1943. console.log(fujiaselectData.value)
  1944. let arr =[]
  1945. zhibiaoselectData.value.map(item=>{
  1946. if(item.zc==true){
  1947. item.result='合格'
  1948. item.item=item.检验项目
  1949. item.instrument=item.检测方法
  1950. item.standard=item.相关标准
  1951. delete item.notjc
  1952. delete item.zc
  1953. delete item.yc
  1954. delete item.检验项目
  1955. delete item.检测方法
  1956. delete item.相关标准
  1957. delete item.检验频率
  1958. arr.push(item)
  1959. return item
  1960. }
  1961. if(item.yc==true){
  1962. item.result='不合格'
  1963. item.item=item.检验项目
  1964. item.instrument=item.检测方法
  1965. item.standard=item.相关标准
  1966. delete item.notjc
  1967. delete item.zc
  1968. delete item.yc
  1969. delete item.检验项目
  1970. delete item.检测方法
  1971. delete item.相关标准
  1972. delete item.检验频率
  1973. arr.push(item)
  1974. return item
  1975. }
  1976. if(item.notjc==true){
  1977. item.result='不检测'
  1978. item.item=item.检验项目
  1979. item.instrument=item.检测方法
  1980. item.standard=item.相关标准
  1981. delete item.notjc
  1982. delete item.zc
  1983. delete item.yc
  1984. delete item.检验项目
  1985. delete item.检测方法
  1986. delete item.相关标准
  1987. delete item.检验频率
  1988. // arr.push(item)
  1989. return item
  1990. }
  1991. })
  1992. let arrs=[]
  1993. let fujiastatus=0
  1994. fujiaselectData.value.map(item=>{
  1995. if(item.notjc==true){
  1996. return item
  1997. }else{
  1998. fujiastatus=1
  1999. item.remark=item.缺陷备注
  2000. delete item.notjc
  2001. delete item.缺陷备注
  2002. delete item.编号
  2003. arrs.push(item)
  2004. return item
  2005. }
  2006. })
  2007. if(fujiastatus==1){
  2008. const responses = await AdditionalInspectionRecordAdd(arrs);
  2009. fujiastatus=0
  2010. }
  2011. // const response = await ProcessInspectionRecordsItemAdd(arr);
  2012. const response = await ProcessInspectionRecordsItemAdd(zhibiaoselectData.value);
  2013. // const responses = await AdditionalInspectionRecordAdd(zhibiaoselectData.value);
  2014. if (response.code === 0) {
  2015. ElMessage({
  2016. type: 'success',
  2017. message: '成功'
  2018. })
  2019. zhichengVisible.value=false
  2020. zhibiaoselectData.value=[]
  2021. fujiaselectData.value=[]
  2022. }
  2023. }
  2024. const closedianjianDialog = async () => {
  2025. dianjianVisible.value=false
  2026. }
  2027. const closezhichengDialog = async () => {
  2028. zhichengVisible.value=false
  2029. }
  2030. //获取机台生产信息
  2031. const ReportProduceInfo = async (value,inputName) => {
  2032. const response = await reportProduceInfo({machine:JTMC.split("#")[0]});
  2033. if (response.code === 0) {
  2034. xunchaData.value.order=response.data.order
  2035. xunchaData.value.yjno=response.data.yjno
  2036. xunchaData.value.product_name=response.data.product_name
  2037. xunchaData.value.gxmc=response.data.gxmc
  2038. xunchaData.value.lcdh=0
  2039. xunchaData.value.sczl_bh=''
  2040. xunchaData.value.sczl_name=''
  2041. xunchaData.value.remark=''
  2042. FieldInspectionRecord()
  2043. xunchaVisible.value=true
  2044. }
  2045. }
  2046. // 假设 xunchaselectData 是一个 ref 对象
  2047. const xunchaselectData = ref([]);
  2048. const xunchaData = ref([]);
  2049. // 在 FieldInspectionRecord 方法中填充数据
  2050. const FieldInspectionRecord = async () => {
  2051. const response = await fieldInspectionRecord({ workOrder: xunchaData.value.order, team: BZMC.value});
  2052. console.log(response);
  2053. if (response.code === 0) {
  2054. xunchaselectData.value = response.data;
  2055. }
  2056. }
  2057. //获取机台编号
  2058. const GetMachineMac = async () => {
  2059. var xmlhttp = null;
  2060. var res;
  2061. if (window.XMLHttpRequest) {
  2062. xmlhttp = new XMLHttpRequest();
  2063. } else if (window.ActiveXObject) {
  2064. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  2065. }
  2066. // 2. 设置回调函数
  2067. xmlhttp.onreadystatechange = function() {
  2068. if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
  2069. res = eval('('+xmlhttp.response+')');
  2070. let result = ''
  2071. for (let i = 0; i < res.macAddress.length; i++) {
  2072. if (i % 2 === 0 && i !== 0) {
  2073. result += '-' // 根据实际需求修改分隔符
  2074. }
  2075. result += res.macAddress[i]
  2076. }
  2077. }
  2078. }
  2079. // 3. 打开一个连接http://10.10.4.42/
  2080. xmlhttp.open("get", "http://127.0.0.1:8090/init")
  2081. // 5. 发送
  2082. xmlhttp.send();
  2083. const response = await getMachineMac({ addr: '68-ED-A4-26-60-C8' });
  2084. console.log(response);
  2085. if (response.code === 0) {
  2086. // 将接口返回的数据添加到树型结构中
  2087. let newNode = {
  2088. label: response.data["使用部门"],
  2089. level: 1,
  2090. children: [
  2091. {
  2092. label: response.data["设备编号"],
  2093. level: 2,
  2094. }
  2095. ]
  2096. };
  2097. treeData.value.push(newNode);
  2098. CJMC=newNode.label
  2099. JTMC = newNode.children[0].label;
  2100. FacilityProduction();
  2101. }
  2102. }
  2103. GetMachineMac()
  2104. //提交巡查记录
  2105. const SubmitPatrolRecord = async () => {
  2106. console.log(JTMC.split("#")[0])
  2107. const response = await submitPatrolRecord({
  2108. type:'现场巡查记录',
  2109. machine:JTMC.split("#")[0],
  2110. order:xunchaData.value.order,
  2111. yjno:xunchaData.value.yjno,
  2112. process:xunchaData.value.lcdh,
  2113. no:xunchaData.value.sczl_bh,
  2114. name:xunchaData.value.sczl_name,
  2115. remark:xunchaData.value.remark,
  2116. });
  2117. console.log(response)
  2118. if (response.code === 0) {
  2119. ElMessage({
  2120. type: 'success',
  2121. message: '成功'
  2122. })
  2123. xunchaVisible.value=false
  2124. }
  2125. }
  2126. //日产量上报
  2127. function onchanliang() {
  2128. console.log(JTMC.split("#")[0]); // 通过value属性获取ref对象的值,然后再调用split方法
  2129. ReportInfo()
  2130. }
  2131. //日产量详情获取
  2132. const ReportInfo = async () => {
  2133. const response = await reportInfo({ machine: JTMC.split("#")[0] });
  2134. if (response.code === 0) {
  2135. const { order_info, class: classInfo } = response.data;
  2136. const newData = {
  2137. order: order_info.order,
  2138. yjno: order_info.yjno,
  2139. gxh: order_info.gxh,
  2140. gxmc: order_info.gxmc,
  2141. product_name: order_info.product_name,
  2142. yj_name: order_info.yj_name,
  2143. gy_name: order_info.gy_name,
  2144. sczl_jtbh: classInfo.sczl_jtbh,
  2145. sczl_bzdh: classInfo.sczl_bzdh,
  2146. sys_id: classInfo.sys_id,
  2147. sys_rq: classInfo.sys_rq,
  2148. mod_rq: classInfo.mod_rq,
  2149. UniqId: classInfo.UniqId,
  2150. sczl_bh1: classInfo.sczl_bh1,
  2151. sczl_bh2: classInfo.sczl_bh2,
  2152. sczl_bh3: classInfo.sczl_bh3,
  2153. sczl_bh4: classInfo.sczl_bh4,
  2154. sczl_bh5: classInfo.sczl_bh5,
  2155. sczl_bh6: classInfo.sczl_bh6,
  2156. sczl_bh7: classInfo.sczl_bh7,
  2157. sczl_bh8: classInfo.sczl_bh8,
  2158. sczl_bh9: classInfo.sczl_bh9,
  2159. sczl_bh10: classInfo.sczl_bh10,
  2160. sczl_name1: classInfo.sczl_name1,
  2161. sczl_name2: classInfo.sczl_name2,
  2162. sczl_name3: classInfo.sczl_name3,
  2163. sczl_name4: classInfo.sczl_name4,
  2164. sczl_name5: classInfo.sczl_name5,
  2165. sczl_name6: classInfo.sczl_name6,
  2166. sczl_name7: classInfo.sczl_name7,
  2167. sczl_name8: classInfo.sczl_name8,
  2168. sczl_name9: classInfo.sczl_name9,
  2169. sczl_name10: classInfo.sczl_name10,
  2170. sczl_rate1: classInfo.sczl_rate1,
  2171. sczl_rate2: classInfo.sczl_rate2,
  2172. sczl_rate3: classInfo.sczl_rate3,
  2173. sczl_rate4: classInfo.sczl_rate4,
  2174. sczl_rate5: classInfo.sczl_rate5,
  2175. sczl_rate6: classInfo.sczl_rate6,
  2176. sczl_rate7: classInfo.sczl_rate7,
  2177. sczl_rate8: classInfo.sczl_rate8,
  2178. sczl_rate9: classInfo.sczl_rate9,
  2179. sczl_rate10: classInfo.sczl_rate10,
  2180. };
  2181. formData3.value = { ...formData3.value, ...newData };
  2182. chanliangselectData.splice(0, chanliangselectData.length, ...response.data.bom)
  2183. chanliangVisible.value=true
  2184. }
  2185. // getTableData()
  2186. }
  2187. //日报表弹窗确定
  2188. const chanliangenterDialog = async () => {
  2189. SubmitDailyProduction()
  2190. }
  2191. //日报表上传
  2192. const SubmitDailyProduction = async () => {
  2193. const restoredData = {
  2194. sczl_gdbh:formData3.value.order,
  2195. sczl_yjno:formData3.value.yjno,
  2196. sczl_gxh:formData3.value.gxh,
  2197. sczl_gxmc: formData3.value.gxmc,
  2198. sczl_bzdh: formData3.value.sczl_bzdh,
  2199. sczl_bh1: formData3.value.sczl_bh1,
  2200. sczl_bh2: formData3.value.sczl_bh2,
  2201. sczl_bh3: formData3.value.sczl_bh3,
  2202. sczl_bh4: formData3.value.sczl_bh4,
  2203. sczl_bh5: formData3.value.sczl_bh5,
  2204. sczl_bh6: formData3.value.sczl_bh6,
  2205. sczl_bh7: formData3.value.sczl_bh7,
  2206. sczl_bh8: formData3.value.sczl_bh8,
  2207. sczl_bh9: formData3.value.sczl_bh9,
  2208. sczl_bh10: formData3.value.sczl_bh10,
  2209. sczl_rate1: formData3.value.sczl_rate1,
  2210. sczl_rate2: formData3.value.sczl_rate2,
  2211. sczl_rate3: formData3.value.sczl_rate3,
  2212. sczl_rate4: formData3.value.sczl_rate4,
  2213. sczl_rate5: formData3.value.sczl_rate5,
  2214. sczl_rate6: formData3.value.sczl_rate6,
  2215. sczl_rate7: formData3.value.sczl_rate7,
  2216. sczl_rate8: formData3.value.sczl_rate8,
  2217. sczl_rate9: formData3.value.sczl_rate9,
  2218. sczl_rate10: formData3.value.sczl_rate10,
  2219. sczl_jtbh: 'JY01',
  2220. sczl_rq: formData3.value.日期,
  2221. sczl_num: formData3.value.流程标牌,
  2222. sczl_sj1: formData3.value.上机时间,
  2223. sczl_sj2: formData3.value.下机时间,
  2224. sczl_cl: formData3.value.产量,
  2225. sczl_zcfp: formData3.value.制程废品,
  2226. sczl_zccp: formData3.value.制程次品,
  2227. last_fp: formData3.value.前工序废,
  2228. less_sl: formData3.value.来料异常,
  2229. sczl_ls: formData3.value.联数,
  2230. sczl_ms: formData3.value.墨色,
  2231. zb_time: formData3.value.装版总工时,
  2232. dy_time: formData3.value.打样总工时,
  2233. run_time: formData3.value.通电工时,
  2234. sczl_dedh: formData3.value.定额代号,
  2235. code: formData3.value.码包,
  2236. main_meter: formData3.value.主电表,
  2237. auxiliary_meter: formData3.value.辅电表,
  2238. bom: formData3.value.formattedArray
  2239. }
  2240. console.log(restoredData)
  2241. console.log(formData3.value.formattedArray)
  2242. const response = await submitDailyProduction(restoredData);
  2243. console.log(response)
  2244. if (response.code === 0) {
  2245. FacilityDetail()
  2246. chanliangVisible.value=false
  2247. }
  2248. }
  2249. // let formattedArray
  2250. // 产量单选
  2251. const chanliangSelectionChange = (val) => {
  2252. // if(val.length>0){
  2253. // multipleSelection.value = val
  2254. // const lenth=val.length
  2255. // lastCellValue=val[lenth-1].UniqId
  2256. // console.log(val)
  2257. // val.splice(0, val.length); // 清空 val 数组
  2258. // console.log(lastCellValue)
  2259. // }
  2260. const selectedItems =val
  2261. // 存储batch和st_wlbh的数组
  2262. formData3.value.formattedArray = selectedItems.map(item => `${item.batch}-${item.st_wlbh}`).join(',');
  2263. console.log(formData3.value.formattedArray);
  2264. // console.log(selectedItems)
  2265. }
  2266. //获取设备点检->检验项目
  2267. const FacilityInspectionItem = async (value) => {
  2268. try {
  2269. // 调用接口获取巡检项目数据
  2270. const response = await facilityInspectionItem({ unitName: value ,machine:JTMC.split("#")[0]});
  2271. // 检查接口返回的状态码
  2272. if (response.code === 0) {
  2273. console.log(response)
  2274. dianjianselectData.splice(0, dianjianselectData.length, ...response.data.map(item=>{
  2275. item.notjc=true;
  2276. item.zc=false;
  2277. item.yc=false;
  2278. item.remark=''
  2279. item.unitName=value
  2280. item.team=BZMC.value
  2281. item.machine=JTMC
  2282. return item
  2283. }))
  2284. }
  2285. } catch (error) {
  2286. // 捕获并打印异常
  2287. console.error("获取巡检项目数据出错:" + error);
  2288. return null;
  2289. }
  2290. };
  2291. //树形结构单机
  2292. const dianjianselectData = reactive([])
  2293. const dianjianNodeClick = (node, check, nodeData) => {
  2294. console.log('111')
  2295. if (node.children && node.children.length > 0) {
  2296. // 点击的是父节点,且有子节点
  2297. // 执行相应的父节点单击事件处理逻辑
  2298. // 这里可以添加你想要的处理逻辑,比如展开/折叠节点等
  2299. } else {
  2300. // 点击的是子节点,或者没有子节点
  2301. // 执行相应的子节点单击事件处理逻辑
  2302. FacilityInspectionItem(node.label)
  2303. }
  2304. };
  2305. const category =ref()
  2306. const zhichengNodeClick = (node, check) => {
  2307. if(node.label){
  2308. zhichengstatus.value=true
  2309. category.value=node.label
  2310. processInspectionRecordsItem()
  2311. }
  2312. };
  2313. const processInspectionRecordsItem = async (value) => {
  2314. const response = await ProcessInspectionRecordsItem({ process: xunchaData.value.gxmc });
  2315. if (response.code === 0) {
  2316. zhibiaoselectData.value=response.data.首件.指标检验.map(item=>{
  2317. item.notjc=true;
  2318. item.zc=false;
  2319. item.yc=false;
  2320. item.remark=''
  2321. item.category=category.value
  2322. item.workOrder=xunchaData.value.order
  2323. item.yjno=xunchaData.value.yjno
  2324. item.flow=xunchaData.value.lcdh
  2325. item.team=BZMC.value
  2326. item.machine=JTMC.split("#")[0]
  2327. return item
  2328. })
  2329. fujiaselectData.value=response.data.首件.附加.map(item=>{
  2330. item.notjc=true;
  2331. item.workOrder=xunchaData.value.order
  2332. item.yjno=xunchaData.value.yjno
  2333. item.flow=xunchaData.value.lcdh
  2334. item.machine=JTMC.split("#")[0]
  2335. return item
  2336. })
  2337. }
  2338. };
  2339. const notjcClick = (val) => {
  2340. try {
  2341. if(val.notjc==false){
  2342. val.zc=false
  2343. val.yc==false
  2344. }else{
  2345. val.zc=true
  2346. val.yc==false
  2347. }
  2348. } catch (error) {
  2349. console.error('An error occurred:', error);
  2350. }
  2351. };
  2352. const zcClick = (val) => {
  2353. try {
  2354. if(val.notjc==false){
  2355. if(val.zc==false){
  2356. val.yc=false
  2357. }else{
  2358. val.yc==true
  2359. }
  2360. }{
  2361. val.zc=true
  2362. }
  2363. } catch (error) {
  2364. console.error('An error occurred:', error);
  2365. }
  2366. };
  2367. const ycClick = (val) => {
  2368. try {
  2369. if(val.notjc==false){
  2370. if(val.yc==false){
  2371. val.zc=false
  2372. }else{
  2373. val.zc=true
  2374. }
  2375. }else{
  2376. val.yc=true
  2377. }
  2378. } catch (error) {
  2379. console.error('An error occurred:', error);
  2380. }
  2381. };
  2382. let pandingfangfa=ref()
  2383. //检验项目单击
  2384. const dianjianhandle = async (val, row) => {
  2385. try {
  2386. console.log(val.判定标准);
  2387. pandingfangfa.value = val.判定标准;
  2388. } catch (error) {
  2389. console.error('An error occurred:', error);
  2390. }
  2391. };
  2392. const rowClassName = (row, column) => {
  2393. try {
  2394. if (row.unchecked) {
  2395. return 'row-yellow';
  2396. }
  2397. return '';
  2398. } catch (error) {
  2399. console.error('An error occurred:', error);
  2400. return '';
  2401. }
  2402. };
  2403. function duohandleClick(table) {
  2404. console.log(table.props.label)
  2405. if(table.props.label=='当班产量明细'){
  2406. zdtreeType.value=true
  2407. }else{
  2408. zdtreeType.value=false
  2409. }
  2410. }
  2411. // 异步函数,用于获取指定设备的巡检项目,并且将结果格式化为树形结构数据
  2412. const getSpotCheckItem = async (machineName) => {
  2413. try {
  2414. // 调用接口获取巡检项目数据
  2415. const response = await facilitySpotCheckItem({ machine: machineName });
  2416. // 检查接口返回的状态码
  2417. if (response.code === 0) {
  2418. // 构建树形结构数据
  2419. const childrenData = Object.entries(response.data).map(([id, label]) => {
  2420. return {
  2421. id, // 子节点的唯一标识
  2422. label, // 子节点的标签
  2423. children: [] // 初始化子节点数组
  2424. };
  2425. });
  2426. // 创建包含父节点的树形结构数据
  2427. const treeData = [{
  2428. id: machineName, // 父节点的唯一标识
  2429. label: machineName, // 父节点的标签
  2430. children: childrenData // 子节点数据
  2431. }];
  2432. // 返回构建好的树形结构数据
  2433. return treeData;
  2434. } else {
  2435. // 如果接口返回的状态码不是0,打印错误信息
  2436. console.error("接口返回错误:" + response.msg);
  2437. return null;
  2438. }
  2439. } catch (error) {
  2440. // 捕获并打印异常
  2441. console.error("获取巡检项目数据出错:" + error);
  2442. return null;
  2443. }
  2444. };
  2445. // 班组人员及分配比例
  2446. const FacilityTeam = async (value) => {
  2447. const response = await facilityTeam({ machine: value });
  2448. if (response.code === 0) {
  2449. console.log(response);
  2450. // 清空 bzData 数组
  2451. bzData.splice(0, bzData.length);
  2452. // 遍历接口返回的数据,并给每个对象添加 JTMC 属性
  2453. const updatedData = response.data.map(item => {
  2454. return { ...item, JTMC: value }; // 添加 JTMC 属性
  2455. });
  2456. // 将更新后的数据添加到 bzData 数组
  2457. bzData.push(...updatedData);
  2458. FPData.push(...updatedData)
  2459. console.log(FPData)
  2460. }
  2461. };
  2462. //班组维护
  2463. function onBZ() {
  2464. FacilityTeam(JTMC)
  2465. fetchData()
  2466. detailShow.value=true
  2467. console.log('2222')
  2468. }
  2469. // 下拉框选项数据
  2470. const dropdownOptions = ref([]);
  2471. // 选中的选项
  2472. const selectedOption = ref('');
  2473. // 获取接口数据并转换为下拉框需要的格式
  2474. const fetchData = async () => {
  2475. try {
  2476. // Simulate API call
  2477. const response = await facilityMachineList();
  2478. if (response.code === 0) {
  2479. // Transform data format
  2480. const options = response.data.map((item) => ({
  2481. label: item,
  2482. value: item
  2483. }));
  2484. dropdownOptions.value = options;
  2485. // Default to selecting the first option
  2486. const defaultOption = options.find(option => option.value === JTMC);
  2487. if (defaultOption) {
  2488. selectedOption.value = defaultOption.value;
  2489. } else if (options.length > 0) {
  2490. // 如果 myDefaultValue 不在选项中,选择第一个选项
  2491. selectedOption.value = options[0].value;
  2492. }
  2493. }
  2494. } catch (error) {
  2495. console.error('Error fetching data:', error);
  2496. // Handle the error appropriately
  2497. }
  2498. };
  2499. // formData
  2500. let BZMC=ref()
  2501. let lastCellValue=ref()
  2502. let parts =reactive([])
  2503. const formData3= ref({
  2504. order:'',
  2505. yjno:'',
  2506. gxh:'',
  2507. gxmc:'',
  2508. product_name:'',
  2509. yj_name:'',
  2510. gy_name:'',
  2511. sczl_jtbh:'',
  2512. sczl_bzdh:'',
  2513. sys_id:'',
  2514. sys_rq:'',
  2515. mod_rq:'',
  2516. UniqId:'',
  2517. sczl_bh1:'',
  2518. sczl_bh2:'',
  2519. sczl_bh3:'',
  2520. sczl_bh4:'',
  2521. sczl_bh5:'',
  2522. sczl_bh6:'',
  2523. sczl_bh7:'',
  2524. sczl_bh8:'',
  2525. sczl_bh9:'',
  2526. sczl_bh10:'',
  2527. sczl_name1:'',
  2528. sczl_name2:'',
  2529. sczl_name3:'',
  2530. sczl_name4:'',
  2531. sczl_name5:'',
  2532. sczl_name6:'',
  2533. sczl_name7:'',
  2534. sczl_name8:'',
  2535. sczl_name9:'',
  2536. sczl_name10:'',
  2537. sczl_rate1:'',
  2538. sczl_rate2:'',
  2539. sczl_rate3:'',
  2540. sczl_rate4:'',
  2541. sczl_rate5:'',
  2542. sczl_rate6:'',
  2543. sczl_rate7:'',
  2544. sczl_rate8:'',
  2545. sczl_rate9:'',
  2546. sczl_rate10:'',
  2547. 日期:'',
  2548. 流程标牌:'',
  2549. 上机时间:'',
  2550. 下机时间:'',
  2551. 产量:'',
  2552. 制程废品:'',
  2553. 制程次品:'',
  2554. 前工序废:'',
  2555. 来料异常:'',
  2556. 联数:'',
  2557. 墨色:'',
  2558. 装版总工时:'',
  2559. 打样总工时:'',
  2560. 通电工时:'',
  2561. 定额代号:'',
  2562. 码包:'',
  2563. 主电表:'',
  2564. 辅电表:'',
  2565. formattedArray:'',
  2566. })
  2567. // 自动化生成的字典(可能为空)以及字段
  2568. const formData= ref({
  2569. // 工单编号:'',
  2570. // 印件号:'',
  2571. // 工序名称:'',
  2572. // 产品名称:'',
  2573. // sczl_bh1:'',
  2574. // sczl_bh2:'',
  2575. // sczl_bh3:'',
  2576. // sczl_bh4:'',
  2577. // sczl_bh5:'',
  2578. // sczl_bh6:'',
  2579. // sczl_bh7:'',
  2580. // sczl_bh8:'',
  2581. // sczl_bh9:'',
  2582. // sczl_bh10:'',
  2583. // sczl_name1:'',
  2584. // sczl_name2:'',
  2585. // sczl_name3:'',
  2586. // sczl_name4:'',
  2587. // sczl_name5:'',
  2588. // sczl_name6:'',
  2589. // sczl_name7:'',
  2590. // sczl_name8:'',
  2591. // sczl_name9:'',
  2592. // sczl_name10:'',
  2593. // 班组:'',
  2594. // order:'',
  2595. // yjno:'',
  2596. // product_name:'',
  2597. // gxmc:'',
  2598. })
  2599. const formDatasData= reactive([])
  2600. const formDatas = ref({
  2601. code1:'',
  2602. code2:'',
  2603. code3:'',
  2604. code4:'',
  2605. code5:'',
  2606. code6:'',
  2607. code7:'',
  2608. code8:'',
  2609. code9:'',
  2610. code10:'',
  2611. name1:'',
  2612. name2:'',
  2613. name3:'',
  2614. name4:'',
  2615. name5L:'',
  2616. name6:'',
  2617. name7:'',
  2618. name8:'',
  2619. name9:'',
  2620. name10:'',
  2621. percentage1:'',
  2622. percentage2:'',
  2623. percentage3:'',
  2624. percentage4:'',
  2625. percentage5:'',
  2626. percentage6:'',
  2627. percentage7:'',
  2628. percentage8:'',
  2629. percentage9:'',
  2630. percentage10:'',
  2631. })
  2632. const currentBz ={}
  2633. //班组单击
  2634. const BZhandle = (val, row) => {
  2635. console.log(val.ID)
  2636. console.log(val)
  2637. currentBz.value=val
  2638. formDatas.value = {};
  2639. for (const key in val) {
  2640. if (val[key] === 0) {
  2641. break;
  2642. }
  2643. const parts = val[key].split(/[\s()]+/);
  2644. const code = parts[0];
  2645. const name = parts[1];
  2646. const percentage = parts[2];
  2647. // 根据索引填充不同的字段
  2648. const index = parseInt(key) + 1; // 索引从1开始
  2649. formDatas.value['code' + index] = code;
  2650. formDatas.value['name' + index] = name;
  2651. formDatas.value['percentage' + index] = percentage;
  2652. BZMC.value=val.班组号
  2653. }
  2654. };
  2655. const selectBz = async() => {
  2656. if(currentBz.value){
  2657. BZMC.value=currentBz.value.班组号
  2658. let sczl_bhkey=''
  2659. let sczl_namekey=''
  2660. if (currentBz.value) {
  2661. for (let i = 1; i <= 6; i++) {
  2662. sczl_bhkey=`sczl_bh${i}`
  2663. sczl_namekey=`sczl_name${i}`
  2664. formData.value[sczl_bhkey] = '';
  2665. formData.value[sczl_namekey] = '';
  2666. }
  2667. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length-4, 6); i++) {
  2668. sczl_bhkey=`sczl_bh${i}`
  2669. sczl_namekey=`sczl_name${i}`
  2670. console.log(currentBz.value[i-1].split(' '))
  2671. formData.value[sczl_bhkey] = currentBz.value[i-1].split(' ')[0];
  2672. formData.value[sczl_namekey] = currentBz.value[i-1].split(' ')[1];
  2673. classbz.value[i-1]=currentBz.value[i-1].split(' ')[0]
  2674. }
  2675. formData.value.class=classbz.value.join(',')
  2676. }
  2677. const response = await setMachineTeam({
  2678. machine: JTMC.split("#")[0],
  2679. order:formData.value.工单编号,
  2680. yjno:formData.value.印件号,
  2681. gy_name:formData.value.工序名称,
  2682. sczl_bzdh:BZMC.value,
  2683. status:formData.value.状态,
  2684. production_now:0,
  2685. production_all:0,
  2686. team_id:currentBz.value.ID
  2687. })
  2688. if(response.code===0){
  2689. ElMessage({
  2690. type: 'success',
  2691. message: '成功'
  2692. })
  2693. }
  2694. currentBz.value={}
  2695. }
  2696. }
  2697. const delBz = async() => {
  2698. if(currentBz.value){
  2699. ElMessageBox.confirm('确定要删除吗?', '提示', {
  2700. confirmButtonText: '确定',
  2701. cancelButtonText: '取消',
  2702. type: 'warning'
  2703. }).then(() => {
  2704. teamDel(currentBz.value.ID)
  2705. })
  2706. currentBz.value={}
  2707. }
  2708. }
  2709. // ============== 表格控制部分结束 ===============
  2710. // 获取需要的字典 可能为空 按需保留
  2711. const setOptions = async () =>{
  2712. }
  2713. // 获取需要的字典 可能为空 按需保留
  2714. setOptions()
  2715. // 多选数据
  2716. const multipleSelection = ref([])
  2717. // 多选
  2718. const handleSelectionChange = (val) => {
  2719. multipleSelection.value = val
  2720. }
  2721. const zdtreeType = ref(false)
  2722. const showsTable = (val,tab) => {
  2723. }
  2724. const showTable = (val,tab) => {
  2725. // zdtreeType.value=false
  2726. }
  2727. // 删除行
  2728. const deleteRow = (row) => {
  2729. ElMessageBox.confirm('确定要删除吗?', '提示', {
  2730. confirmButtonText: '确定',
  2731. cancelButtonText: '取消',
  2732. type: 'warning'
  2733. }).then(() => {
  2734. deleteCompanyFunc(row)
  2735. })
  2736. }
  2737. // 批量删除控制标记
  2738. const deleteVisible = ref(false)
  2739. // 多选删除
  2740. const onDelete = async() => {
  2741. const ids = []
  2742. if (multipleSelection.value.length === 0) {
  2743. ElMessage({
  2744. type: 'warning',
  2745. message: '请选择要删除的数据'
  2746. })
  2747. return
  2748. }
  2749. multipleSelection.value &&
  2750. multipleSelection.value.map(item => {
  2751. ids.push(item.ID)
  2752. })
  2753. const res = await deleteCompanyByIds({ ids })
  2754. if (res.code === 0) {
  2755. ElMessage({
  2756. type: 'success',
  2757. message: '删除成功'
  2758. })
  2759. if (tableData.value.length === ids.length && page.value > 1) {
  2760. page.value--
  2761. }
  2762. deleteVisible.value = false
  2763. getTableData()
  2764. }
  2765. }
  2766. // 行为控制标记(弹窗内部需要增还是改)
  2767. const type = ref('')
  2768. // 更新行
  2769. const updateCompanyFunc = async(row) => {
  2770. const res = await findCompany({ ID: row.ID })
  2771. type.value = 'update'
  2772. if (res.code === 0) {
  2773. formData.value = res.data.recompany
  2774. dialogFormVisible.value = true
  2775. }
  2776. }
  2777. const yjupdateCompanyFunc = async(row) => {
  2778. console.log(row)
  2779. const res = await setMachineTeam({
  2780. machine: JTMC.split("#")[0],
  2781. order:row['工单编号|质量信息'].split('|')[0],
  2782. yjno:row['工序名称'].split('-')[0],
  2783. gy_name:row['工序名称'],
  2784. sczl_bzdh:BZMC.value,
  2785. status:formData.value.状态,
  2786. production_now:0,
  2787. production_all:0,
  2788. team_id:formData.value.班组Id
  2789. })
  2790. if (res.code === 0) {
  2791. FacilityProduction()
  2792. ElMessage({
  2793. type: 'success',
  2794. message: '成功'
  2795. })
  2796. }
  2797. }
  2798. // 删除行
  2799. const deleteCompanyFunc = async (row) => {
  2800. const res = await deleteCompany({ ID: row.ID })
  2801. if (res.code === 0) {
  2802. ElMessage({
  2803. type: 'success',
  2804. message: '删除成功'
  2805. })
  2806. if (tableData.value.length === 1 && page.value > 1) {
  2807. page.value--
  2808. }
  2809. getTableData()
  2810. }
  2811. }
  2812. // 弹窗控制标记
  2813. const dialogFormVisible = ref(false)
  2814. const dianjianVisible = ref(false)
  2815. const zhichengVisible = ref(false)
  2816. // 查看详情控制标记
  2817. const detailShow = ref(false)
  2818. const bzData = reactive([])
  2819. // 打开详情弹窗
  2820. const openDetailShow = () => {
  2821. detailShow.value = true
  2822. }
  2823. // 打开详情
  2824. const getDetails = async (row) => {
  2825. // 打开弹窗
  2826. const res = await findCompany({ ID: row.ID })
  2827. if (res.code === 0) {
  2828. formData.value = res.data.recompany
  2829. openDetailShow()
  2830. }
  2831. }
  2832. // 关闭详情弹窗
  2833. const closeDetailShow = () => {
  2834. detailShow.value = false
  2835. // formData.value = {
  2836. // address: '',
  2837. // image: '',
  2838. // name: '',
  2839. // }
  2840. }
  2841. // 打开弹窗
  2842. const openDialog = () => {
  2843. // type.value = 'create'
  2844. // console.log('222')
  2845. // FacilityInspect()
  2846. // dialogFormVisible.value = true
  2847. }
  2848. let drzcData=[]
  2849. let columnNames=[]
  2850. //当日制程检验记录
  2851. const FacilityInspect = async () => {
  2852. const response = await facilityInspect({machine:'JY01#',date:'2024-01-04'});
  2853. console.log(response)
  2854. if(response.code==0){
  2855. // 提取 inspectiontime 作为列名
  2856. // Extract inspectiontime as columnNames
  2857. columnNames = response.data.inspectiontime;
  2858. // Populate drzcData with row data
  2859. for (const key in response.data) {
  2860. if (key !== 'inspectiontime') {
  2861. const item = response.data[key];
  2862. const rowData = {
  2863. '工单编号': item['工单编号'],
  2864. '印件号': item['印件号'],
  2865. '工序名称': item['工序名称'],
  2866. '检验项目': item['检验项目']
  2867. };
  2868. // Initialize time columns with '—'
  2869. columnNames.forEach(time => {
  2870. rowData[time] = '';
  2871. });
  2872. // Split inspectresult and fill the corresponding time columns
  2873. const results = item['inspectresult'].split(',');
  2874. results.forEach(result => {
  2875. if (columnNames.includes(result)) {
  2876. rowData[result] = '√';
  2877. }else{rowData[result] = ''}
  2878. });
  2879. // Add the row data to drzcData
  2880. drzcData.push(rowData);
  2881. }
  2882. }
  2883. console.log(drzcData);
  2884. }
  2885. }
  2886. // 关闭弹窗
  2887. const closeDialog = () => {
  2888. dialogFormVisible.value = false
  2889. formData.value = {
  2890. address: '',
  2891. image: '',
  2892. name: '',
  2893. }
  2894. }
  2895. const equipmentCode=ref('JY01')
  2896. const equipmentName=ref('海德堡对开')
  2897. const workOrder=ref('2312117')
  2898. const number=ref('1907')
  2899. // 弹窗确定
  2900. const enterDialog = async () => {
  2901. elFormRef.value?.validate( async (valid) => {
  2902. if (!valid) return
  2903. let res
  2904. switch (type.value) {
  2905. case 'create':
  2906. res = await createCompany(formData.value)
  2907. break
  2908. case 'update':
  2909. res = await updateCompany(formData.value)
  2910. break
  2911. default:
  2912. res = await createCompany(formData.value)
  2913. break
  2914. }
  2915. if (res.code === 0) {
  2916. ElMessage({
  2917. type: 'success',
  2918. message: '创建/更改成功'
  2919. })
  2920. closeDialog()
  2921. getTableData()
  2922. }
  2923. })
  2924. }
  2925. </script>
  2926. <style>
  2927. .JKWTree-container {
  2928. display: flex;
  2929. }
  2930. .JKWTree-tree {
  2931. width: 300px;
  2932. background-color: #fff;
  2933. padding: 10px;
  2934. margin-right: 20px;
  2935. }
  2936. .JKWTree-tree h3 {
  2937. font-size: 15px;
  2938. font-weight: 700;
  2939. margin: 10px 0;
  2940. }
  2941. .JKWTree-content {
  2942. flex: 1;
  2943. }
  2944. .groupbox
  2945. {margin:10px;
  2946. width:500px;
  2947. height:500px;
  2948. border:thin solid black;
  2949. padding:10px}
  2950. .grouptitle
  2951. {display:block;
  2952. margin-top:-24px;
  2953. margin-left:20px;
  2954. width:150px;
  2955. text-align:center;
  2956. background-color:white}
  2957. /* 选中某行时的背景色*/
  2958. .el-table__body tr.current-row>td {
  2959. background: #ff80ff !important;
  2960. }
  2961. </style>