shebeiyunxing.vue 129 KB

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