shebeiyunxing.vue 87 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582
  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. </header>
  14. <el-container>
  15. <el-aside width="200px">
  16. <div class="JKWTree-tree">
  17. <h3 >设备运行跟踪</h3>
  18. <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
  19. </div>
  20. </el-aside>
  21. <el-container>
  22. <el-main>
  23. <div class="gva-search-box" v-if="JTMCOn" style="overflow: hidden; padding: 0; display: flex;">
  24. <div style="flex: 1; border: 0px magenta solid; margin: 0; padding: 0;">
  25. <el-row :gutter="20">
  26. <el-col :span="24">
  27. <el-form-item label="工单编号" prop="name">
  28. <el-row :gutter="20">
  29. <el-col :span="6">
  30. <el-input v-model="formData.工单编号" :clearable="true" />
  31. </el-col>
  32. <el-col :span="18">
  33. <el-input v-model="formData.产品名称" :clearable="true" />
  34. </el-col>
  35. </el-row>
  36. </el-form-item>
  37. </el-col>
  38. </el-row>
  39. <el-row :gutter="20">
  40. <el-col :span="6">
  41. <el-form-item label="印件编号" prop="id">
  42. <el-input v-model="formData.印件编号" :clearable="true" />
  43. </el-form-item>
  44. </el-col>
  45. <el-col :span="17">
  46. <el-form-item label="工序名称" prop="name">
  47. <el-input v-model="formData.工序名称" :clearable="true" />
  48. </el-form-item>
  49. </el-col>
  50. </el-row>
  51. <el-row :gutter="20">
  52. <el-col :span="4">
  53. <el-form-item label="班组成员" prop="id">
  54. </el-form-item>
  55. </el-col>
  56. </el-row>
  57. <el-row :gutter="1">
  58. <el-col :span="4">
  59. <el-input v-model="formData.sczl_bh1" :clearable="true" />
  60. </el-col>
  61. <el-col :span="4">
  62. <el-input v-model="formData.sczl_bh2" :clearable="true" />
  63. </el-col>
  64. <el-col :span="4">
  65. <el-input v-model="formData.sczl_bh3" :clearable="true" />
  66. </el-col>
  67. <el-col :span="4">
  68. <el-input v-model="formData.sczl_bh4" :clearable="true" />
  69. </el-col>
  70. <el-col :span="4">
  71. <el-input v-model="formData.sczl_bh5" :clearable="true" />
  72. </el-col>
  73. <el-col :span="4">
  74. <el-input v-model="formData.sczl_bh6" :clearable="true" />
  75. </el-col>
  76. </el-row>
  77. <el-row :gutter="1">
  78. <el-col :span="4">
  79. <el-input v-model="formData.sczl_name1" :clearable="true" />
  80. </el-col>
  81. <el-col :span="4">
  82. <el-input v-model="formData.sczl_name2" :clearable="true" />
  83. </el-col>
  84. <el-col :span="4">
  85. <el-input v-model="formData.sczl_name3" :clearable="true" />
  86. </el-col>
  87. <el-col :span="4">
  88. <el-input v-model="formData.sczl_name4" :clearable="true" />
  89. </el-col>
  90. <el-col :span="4">
  91. <el-input v-model="formData.sczl_name5" :clearable="true" />
  92. </el-col>
  93. <el-col :span="4">
  94. <el-input v-model="formData.sczl_name6" :clearable="true" />
  95. </el-col>
  96. </el-row>
  97. </div>
  98. <div style="flex: 1; border: 0px lawngreen solid; margin: 0; padding: 0; overflow: hidden;">
  99. <el-table
  100. tooltip-effect="dark"
  101. :data="selectData"
  102. row-key="ID"
  103. highlight-current-row="true"
  104. border
  105. style="width:100%;height: 30vh;"
  106. @row-dblclick="handleSelectClick"
  107. >
  108. <el-table-column
  109. prop="process"
  110. label="印件及工序"
  111. width="340"
  112. />
  113. <el-table-column
  114. prop="completed"
  115. label="已完成板数"
  116. width="150"
  117. />
  118. </el-table>
  119. </div>
  120. </div>
  121. <div v-if="JTMCOn" class="gva-table-box">
  122. <div class="gva-btn-list">
  123. </div>
  124. <el-tabs v-model="activName" type="card" @tab-click="handleClick">
  125. <el-tab-pane label="设备作业清单" @click="showTable('印件资料')" name="first">
  126. <el-table ref="multipleTable"
  127. :show-overflow-tooltip="true"
  128. highlight-current-row="true"
  129. :row-style="{ height: '20px' }"
  130. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  131. :header-cell-style="{ padding: '0px' }"
  132. @row-click="yjupdateCompanyFunc"
  133. style="width: 100%;height: 330px" border tooltip-effect="dark" :data="sbzyData" row-key="ID" @selection-change="handleSelectionChange">
  134. <!-- <el-table-column type="selection" width="55" />-->
  135. <!-- <el-table-column align="left" label="选择" prop="bh" width="80"/> -->
  136. <el-table-column align="left" sortable label="工单编号|质量信息" prop="工单编号|质量信息" width="145" />
  137. <el-table-column align="left" sortable label="印件资料" prop="印件资料" width="240" />
  138. <el-table-column align="left" sortable label="工序名称" prop="工序名称" width="100" />
  139. <el-table-column align="left" sortable label="计划产量/已完成" prop="计划产量/已完成" width="130"/>
  140. <el-table-column align="left" sortable label="装版时数" prop="装版时数" width="85"/>
  141. <el-table-column align="left" sortable label="工序产能" prop="工序产能" width="85"/>
  142. <el-table-column align="left" sortable label="计划工时" prop="计划工时" width="85"/>
  143. <el-table-column align="left" sortable label="计划生产时段" prop="计划生产时段" width="210" />
  144. <el-table-column align="left" sortable label="排产备注" prop="排产备注" width="100" />
  145. <el-table-column align="left" sortable label="产品名称" prop="产品名称" width="240" />
  146. </el-table>
  147. </el-tab-pane>
  148. <el-tab-pane label="班组人员及分配比例" @click="showTable('工艺资料')" name="second">
  149. <el-table ref="multipleTable"
  150. highlight-current-row="true"
  151. :show-overflow-tooltip="true"
  152. :row-style="{ height: '20px' }"
  153. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  154. :header-cell-style="{ padding: '0px' }"
  155. @row-dblclick="gyupdateCompanyFunc"
  156. :row-class-name="rowClassStyle"
  157. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="FPData" row-key="ID" @selection-change="handleSelectionChange"
  158. @row-click="clickybupdate">
  159. <!-- <el-table-column type="selection" width="55" />-->
  160. <!-- <el-table-column align="left" label="选择" prop="方案" width="70"/> -->
  161. <el-table-column align="left" sortable label="班组号" prop="班组号" width="70" />
  162. <el-table-column align="left" sortable label="组员1" prop="0" width="200" />
  163. <el-table-column align="left" sortable label="组员2" prop="1" width="200" />
  164. <el-table-column align="left" sortable label="组员3" prop="2" width="200" />
  165. <el-table-column align="left" sortable label="组员4" prop="3" width="200" />
  166. <el-table-column align="left" sortable label="组员5" prop="4" width="200" />
  167. <el-table-column align="left" sortable label="组员6" prop="5" width="70" />
  168. <el-table-column align="left" sortable label="组员7" prop="6" width="70" />
  169. <el-table-column align="left" sortable label="组员8" prop="7" width="70" />
  170. <el-table-column align="left" sortable label="组员9" prop="8" width="70" />
  171. <el-table-column align="left" sortable label="组员10" prop="9_正品版" width="70" />
  172. </el-table>
  173. </el-tab-pane>
  174. <el-tab-pane label="当班产量明细" @click="showTable('印版资料')" name="third">
  175. <el-table ref="multipleTable"
  176. highlight-current-row="true"
  177. :show-overflow-tooltip="true"
  178. :row-style="{ height: '20px' }"
  179. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  180. :header-cell-style="{ padding: '0px' }"
  181. @row-dblclick="ybupdateCompanyFunc"
  182. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="CLMXData" row-key="ID" @selection-change="handleSelectionChange"
  183. >
  184. <!-- <el-table-column type="selection" width="55" />-->
  185. <el-table-column align="left" sortable label="生产时段" prop="生产时间段" width="180"/>
  186. <el-table-column align="left" sortable label="工单编号" prop="工单编号" width="85" />
  187. <el-table-column align="left" sortable label="产品名称" prop="产品名称" width="150" />
  188. <el-table-column align="left" sortable label="印件及工序" prop="印件及工序" width="320"/>
  189. <el-table-column align="left" sortable label="标牌号" prop="标牌号" width="80"/>
  190. <el-table-column align="left" sortable label="产量" prop="产量" width="100"/>
  191. <el-table-column align="left" sortable label="制程废品" prop="制程废品" width="100" />
  192. <el-table-column align="left" sortable label="制程次品" prop="制程次品" width="100" />
  193. <el-table-column align="left" sortable label="前工序废" prop="前工序废" width="100" />
  194. <el-table-column align="left" sortable label="来料异常" prop="来料异常" width="100"/>
  195. <el-table-column align="left" sortable label="装版工时" prop="装版工时" width="100" />
  196. <el-table-column align="left" sortable label="保养工时" prop="保养工时" width="100" />
  197. <el-table-column align="left" sortable label="打样工时" prop="打样工时" width="100"/>
  198. <el-table-column align="left" sortable label="异常停机工时" prop="异常停机工时" width="120"/>
  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="100" />
  206. </el-table>
  207. </el-tab-pane>
  208. <el-tab-pane label="检验记录" @click="showTable('技术资料附件')" name="fourth">
  209. <el-table ref="multipleTable"
  210. :row-style="{ height: '20px' }"
  211. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  212. :header-cell-style="{ padding: '0px' }"
  213. :show-overflow-tooltip="true"
  214. highlight-current-row="true"
  215. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="JYData" row-key="ID" @selection-change="handleSelectionChange">
  216. <!-- <el-table-column type="selection" width="55" />-->
  217. <el-table-column align="left" sortable label="工单编号" prop="工单编号" width="85"/>
  218. <el-table-column align="left" sortable label="印件号" prop="印件号" width="70" />
  219. <el-table-column align="left" sortable label="工序名称" prop="工序名称" width="85" />
  220. <el-table-column align="left" sortable label="检验项目" prop="检验项目" width="85"/>
  221. <el-table-column
  222. v-for="time in columnNames"
  223. :key="time"
  224. :label="time"
  225. :prop="time"
  226. align="center"
  227. width="80"
  228. ></el-table-column>
  229. </el-table>
  230. </el-tab-pane>
  231. </el-tabs>
  232. </div>
  233. <el-dialog v-model="detailShow" style="width: 1000px" lock-scroll :before-close="closeDetailShow" title="机台班组维护" destroy-on-close>
  234. <el-table ref="multipleTable"
  235. :row-style="{ height: '20px' }"
  236. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  237. :header-cell-style="{ padding: '0px' }"
  238. :show-overflow-tooltip="true"
  239. highlight-current-row="true" @row-click="BZhandle"
  240. style="width: 100%;height: 250px;margin-top: 0px;" border tooltip-effect="dark"
  241. :data="bzData" row-key="ID" @selection-change="BZSelectionChange">
  242. <!-- <el-table-column type="selection" width="55" /> -->
  243. <el-table-column align="left" label="机台" prop="JTMC" width="70"/>
  244. <el-table-column align="left" label="班组" prop="班组号" width="60"/>
  245. <el-table-column align="left" label="组员1" prop="0" width="195"/>
  246. <el-table-column align="left" label="组员2" prop="1" width="195"/>
  247. <el-table-column align="left" label="组员3" prop="2" width="195"/>
  248. <el-table-column align="left" label="组员4" prop="3" width="195"/>
  249. <el-table-column align="left" label="组员5" prop="4" width="70"/>
  250. <el-table-column align="left" label="组员6" prop="5" width="70"/>
  251. <el-table-column align="left" label="组员7" prop="6" width="70"/>
  252. <el-table-column align="left" label="组员8" prop="7" width="70"/>
  253. <el-table-column align="left" label="组员9" prop="8" width="70"/>
  254. <el-table-column align="left" label="特殊组员" prop="9" width="85"/>
  255. <el-table-column align="left" label="UNIQID" prop="ID" width="75"/>
  256. </el-table>
  257. <el-row :gutter="20">
  258. <el-col :span="10">
  259. <el-form-item label="机台编号" prop="id">
  260. <el-select v-model="selectedOption" placeholder="请选择">
  261. <el-option
  262. v-for="item in dropdownOptions"
  263. :key="item.value"
  264. :label="item.label"
  265. :value="item.value"
  266. ></el-option>
  267. </el-select>
  268. </el-form-item>
  269. </el-col>
  270. <el-col :span="10">
  271. <el-form-item label="班组编号" prop="id">
  272. <el-input v-model="BZMC" :clearable="true" placeholder="" />
  273. </el-form-item>
  274. </el-col>
  275. </el-row>
  276. <div style="display: flex;">
  277. <div class="groupbox float-div" style="height: 17vh; width: 800px;">
  278. <span class="grouptitle">组员及分配比例</span>
  279. <el-row :gutter="10" style="margin-top: 0px; height: 5vh;">
  280. <el-col :span="2">
  281. <span></span>
  282. </el-col>
  283. <el-col :span="2">
  284. </el-col>
  285. <el-col :span="2">
  286. </el-col>
  287. <el-col :span="2">
  288. </el-col>
  289. <el-col :span="2">
  290. </el-col>
  291. <el-col :span="2">
  292. </el-col>
  293. <el-col :span="2">
  294. </el-col>
  295. <el-col :span="2">
  296. </el-col>
  297. <el-col :span="2">
  298. </el-col>
  299. <el-col :span="3">
  300. </el-col>
  301. <el-col :span="3">
  302. <el-form-item label="特殊组员" prop="id">
  303. </el-form-item>
  304. </el-col>
  305. </el-row>
  306. <el-row :gutter="10" style="margin-top: 0px;">
  307. <!-- <el-col :span="1">
  308. <span></span>
  309. </el-col> -->
  310. <el-col :span="3">
  311. <el-input v-model="formDatas.code1" :clearable="true" placeholder="" />
  312. </el-col>
  313. <el-col :span="3">
  314. <el-input v-model="formDatas.code2" :clearable="true" placeholder="" />
  315. </el-col>
  316. <el-col :span="3">
  317. <el-input v-model="formDatas.code3" :clearable="true" placeholder="" />
  318. </el-col>
  319. <el-col :span="3">
  320. <el-input v-model="formDatas.code4" :clearable="true" placeholder="" />
  321. </el-col>
  322. <el-col :span="3">
  323. <el-input v-model="formDatas.code5" :clearable="true" placeholder="" />
  324. </el-col>
  325. <el-col :span="3">
  326. <el-input v-model="formDatas.code6" :clearable="true" placeholder="" />
  327. </el-col>
  328. <el-col :span="3">
  329. <el-input v-model="formDatas.code7" :clearable="true" placeholder="" />
  330. </el-col>
  331. <el-col :span="3">
  332. <el-input v-model="formDatas.code8" :clearable="true" placeholder="" />
  333. </el-col>
  334. <!-- <el-col :span="2">
  335. <el-input v-model="formData.name" :clearable="true" placeholder="瞿春生" />
  336. </el-col>
  337. <el-col :span="2">
  338. <el-input v-model="percentage" :clearable="true" placeholder="11.0" />
  339. </el-col>
  340. <el-col :span="2">
  341. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="打包废纸" />
  342. </el-col>
  343. <el-col :span="2">
  344. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="是" />
  345. </el-col>
  346. <el-col :span="2">
  347. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="ZI00401" />
  348. </el-col>
  349. <el-col :span="2">
  350. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="瞿春生" />
  351. </el-col>
  352. <el-col :span="2">
  353. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  354. </el-col>
  355. <el-col :span="2">
  356. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  357. </el-col>
  358. <el-col :span="2">
  359. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  360. </el-col> -->
  361. </el-row>
  362. <el-row :gutter="10" style="margin-top: 1px;">
  363. <!-- <el-col :span="2">
  364. <span></span>
  365. </el-col> -->
  366. <el-col :span="3">
  367. <el-input v-model="formDatas.name1" :clearable="true" placeholder="" />
  368. </el-col>
  369. <el-col :span="3">
  370. <el-input v-model="formDatas.name2" :clearable="true" placeholder="" />
  371. </el-col>
  372. <el-col :span="3">
  373. <el-input v-model="formDatas.name3" :clearable="true" placeholder="" />
  374. </el-col>
  375. <el-col :span="3">
  376. <el-input v-model="formDatas.name4" :clearable="true" placeholder="" />
  377. </el-col>
  378. <el-col :span="3">
  379. <el-input v-model="formDatas.name5" :clearable="true" placeholder="" />
  380. </el-col>
  381. <el-col :span="3">
  382. <el-input v-model="formDatas.name6" :clearable="true" placeholder="" />
  383. </el-col>
  384. <el-col :span="3">
  385. <el-input v-model="formDatas.name7" :clearable="true" placeholder="" />
  386. </el-col>
  387. <el-col :span="3">
  388. <el-input v-model="formDatas.name8" :clearable="true" placeholder="" />
  389. </el-col>
  390. <!-- <el-col :span="2">
  391. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="是" />
  392. </el-col>
  393. <el-col :span="2">
  394. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="ZI00401" />
  395. </el-col>
  396. <el-col :span="2">
  397. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="瞿春生" />
  398. </el-col>
  399. <el-col :span="2">
  400. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  401. </el-col>
  402. <el-col :span="2">
  403. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  404. </el-col>
  405. <el-col :span="2">
  406. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  407. </el-col> -->
  408. </el-row>
  409. <el-row :gutter="10" style="margin-top: 1px;">
  410. <!-- <el-col :span="2">
  411. <span></span>
  412. </el-col> -->
  413. <el-col :span="3">
  414. <el-input v-model="formDatas.percentage1" :clearable="true" placeholder="" />
  415. </el-col>
  416. <el-col :span="3">
  417. <el-input v-model="formDatas.percentage2" :clearable="true" placeholder="" />
  418. </el-col>
  419. <el-col :span="3">
  420. <el-input v-model="formDatas.percentage3" :clearable="true" placeholder="" />
  421. </el-col>
  422. <el-col :span="3">
  423. <el-input v-model="formDatas.percentage4" :clearable="true" placeholder="" />
  424. </el-col>
  425. <el-col :span="3">
  426. <el-input v-model="formDatas.percentage5" :clearable="true" placeholder="" />
  427. </el-col>
  428. <el-col :span="3">
  429. <el-input v-model="formDatas.percentage6" :clearable="true" placeholder="" />
  430. </el-col>
  431. <el-col :span="3">
  432. <el-input v-model="formDatas.percentage5" :clearable="true" placeholder="" />
  433. </el-col>
  434. <el-col :span="3">
  435. <el-input v-model="formDatas.percentage6" :clearable="true" placeholder="" />
  436. </el-col>
  437. <!-- <el-col :span="2">
  438. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="是" />
  439. </el-col>
  440. <el-col :span="2">
  441. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="ZI00401" />
  442. </el-col>
  443. <el-col :span="2">
  444. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="瞿春生" />
  445. </el-col>
  446. <el-col :span="2">
  447. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  448. </el-col>
  449. <el-col :span="2">
  450. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  451. </el-col>
  452. <el-col :span="2">
  453. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  454. </el-col> -->
  455. </el-row>
  456. </div>
  457. <div style="height: 17vh; width: 100px;margin-top: 30px;">
  458. <el-button type="text"></el-button>
  459. <!-- <el-button style="margin-bottom: 5px;" @click="" >新增</el-button> -->
  460. <el-button style="margin-bottom: 5px;" @click="selectBz" >更新当前班组</el-button>
  461. <!-- <el-button @click="delBz" >删除当前班组</el-button> -->
  462. </div>
  463. </div>
  464. </el-dialog>
  465. <el-dialog
  466. v-model="dianjianVisible"
  467. title="设备点检记录"
  468. destroy-on-close
  469. width="1300px"
  470. style="height: 80%;"
  471. >
  472. <el-row :gutter="24">
  473. <el-col :span="3">
  474. <el-form-item label="设备编号" prop="id">
  475. <el-input v-model="formData.JTMC" :clearable="true" />
  476. </el-form-item>
  477. </el-col>
  478. <el-col :span="10">
  479. <el-row>
  480. <el-col>
  481. <el-input v-model="formData.产品名称" :clearable="true" />
  482. </el-col>
  483. </el-row>
  484. </el-col>
  485. </el-row>
  486. <div style="display: flex;">
  487. <div style="flex: 0.1;">
  488. <el-aside width="200px" style="margin: 0;">
  489. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  490. <el-tree :data="dianjiantreeData" :props="defaultProps" highlight-current="true"
  491. @node-click="dianjianNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
  492. </div>
  493. </el-aside>
  494. </div>
  495. <div style="flex: 1; margin: 0;">
  496. <el-table
  497. tooltip-effect="dark"
  498. :data="dianjianselectData"
  499. row-key="ID"
  500. highlight-current-row="true"
  501. :show-overflow-tooltip="true"
  502. border @row-click="dianjianhandle"
  503. style="width:100%; height:400px;"
  504. @row-dblclick="handleSelectClick"
  505. :row-class-name="rowClassName"
  506. >
  507. <el-table-column
  508. prop="检验项目"
  509. label="检验项目"
  510. width="300"
  511. />
  512. <el-table-column
  513. prop="点检方法"
  514. label="点检方法"
  515. width="180"
  516. />
  517. <el-table-column
  518. v-slot="scope"
  519. label="正常"
  520. width="80"
  521. >
  522. <el-checkbox v-model="scope.row.zc" @change="zcClick(scope.row)"></el-checkbox>
  523. </el-table-column>
  524. <el-table-column
  525. v-slot="scope"
  526. label="异常"
  527. width="80"
  528. >
  529. <el-checkbox v-model="scope.row.yc" @change="ycClick(scope.row)"></el-checkbox>
  530. </el-table-column>
  531. <el-table-column
  532. label="备注说明"
  533. width="180"
  534. >
  535. </el-table-column>
  536. <el-table-column
  537. v-slot="scope"
  538. label="不检测"
  539. width="80"
  540. >
  541. <el-checkbox v-model="scope.row.notjc" @change="notjcClick(scope.row)"></el-checkbox>
  542. </el-table-column>
  543. </el-table>
  544. <el-row :gutter="20">
  545. <el-col :span="20">
  546. <el-input v-model="pandingfangfa" style="height: 50px;" :clearable="true" />
  547. </el-col>
  548. </el-row>
  549. </div>
  550. </div>
  551. </el-dialog>
  552. <el-dialog
  553. v-model="yinbanVisible"
  554. title="选择"
  555. destroy-on-close
  556. width="1300px"
  557. style="height: 110%;"
  558. >
  559. <el-row :gutter="24">
  560. <el-col :span="4">
  561. <el-form-item label="工单编号" prop="id">
  562. <el-input v-model="formData.工单编号" :clearable="true" />
  563. </el-form-item>
  564. </el-col>
  565. <el-col :span="6">
  566. <el-form-item prop="id">
  567. <el-input v-model="formData.productCode" :clearable="true" />
  568. </el-form-item>
  569. </el-col>
  570. <el-col :span="14">
  571. <el-form-item prop="id">
  572. <el-input v-model="formData.产品名称" :clearable="true" />
  573. </el-form-item>
  574. </el-col>
  575. </el-row>
  576. <div style="display: flex;">
  577. <div style="flex: 1;">
  578. <el-aside width="250px" style="margin: 0;">
  579. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  580. <el-tree :data="yinbantreeData" :props="defaultProps" highlight-current="true"
  581. @node-click="yinbanNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
  582. </div>
  583. </el-aside>
  584. </div>
  585. <div style="flex: 1; margin: 0;">
  586. <el-table
  587. tooltip-effect="dark"
  588. :data="yinbanselectData"
  589. row-key="ID"
  590. highlight-current-row="true"
  591. border @row-click="dianjianhandle"
  592. style="width:1000px; height:400px;"
  593. @row-dblclick="handleSelectClick"
  594. :row-class-name="rowClassName"
  595. >
  596. <el-table-column
  597. prop="存货编码"
  598. label="存货编码"
  599. width="180"
  600. />
  601. <el-table-column
  602. prop="存货名称"
  603. label="存货名称"
  604. width="180"
  605. />
  606. <el-table-column
  607. prop="印版名称"
  608. label="印版名称"
  609. width="180"
  610. />
  611. <el-table-column
  612. prop="供方批号"
  613. label="供方批号"
  614. width="180"
  615. />
  616. <el-table-column
  617. prop="制造日期"
  618. label="制造日期"
  619. width="180"
  620. />
  621. <el-table-column
  622. prop="印数"
  623. label="印数"
  624. width="180"
  625. />
  626. <el-table-column
  627. prop="印版类别"
  628. label="印版类别"
  629. width="180"
  630. />
  631. <el-table-column
  632. prop="客户编号"
  633. label="客户编号"
  634. width="180"
  635. />
  636. <el-table-column
  637. prop="客户名称"
  638. label="客户名称"
  639. width="180"
  640. />
  641. <el-table-column
  642. prop="产品编号"
  643. label="产品编号"
  644. width="180"
  645. />
  646. <el-table-column
  647. prop="产品名称"
  648. label="产品名称"
  649. width="180"
  650. />
  651. <el-table-column
  652. prop="点检方法"
  653. label="备注说明"
  654. width="180"
  655. />
  656. <el-table-column
  657. prop="点检方法"
  658. label="备注说明"
  659. width="180"
  660. />
  661. </el-table>
  662. </div>
  663. </div>
  664. </el-dialog>
  665. <el-dialog
  666. v-model="xunchaVisible"
  667. title="管理人员现场巡查记录"
  668. destroy-on-close
  669. width="1300px"
  670. style="height: 65%;"
  671. >
  672. <div style="display: flex;">
  673. <div style="flex: 1;">
  674. <el-aside width="250px" style="margin: 0;">
  675. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  676. <el-tree :data="xunchatreeData" :props="defaultProps" highlight-current="true"
  677. @node-click="xunchaNodeClick"></el-tree>
  678. </div>
  679. </el-aside>
  680. </div>
  681. <div style="flex: 1; margin: 0;">
  682. <el-table
  683. tooltip-effect="dark"
  684. :data="xunchaselectData"
  685. row-key="ID"
  686. highlight-current-row="true"
  687. border @row-click="dianjianhandle"
  688. style="width:1000px; height:400px;"
  689. @row-dblclick="handleSelectClick"
  690. :row-class-name="rowClassName"
  691. :show-overflow-tooltip="true"
  692. >
  693. <el-table-column
  694. prop="工单编号"
  695. label="工序编号"
  696. width="85"
  697. />
  698. <el-table-column
  699. prop="印件号"
  700. label="印件号"
  701. width="70"
  702. />
  703. <el-table-column
  704. prop="工序名称"
  705. label="工序名称"
  706. width="180"
  707. />
  708. <el-table-column
  709. prop="流程单号"
  710. label="流程单号"
  711. width="85"
  712. />
  713. <el-table-column
  714. prop="设备编号"
  715. label="设备编号"
  716. width="85"
  717. />
  718. <el-table-column
  719. prop="班组编号"
  720. label="班组编号"
  721. width="85"
  722. />
  723. <el-table-column
  724. prop="检验备注"
  725. label="检验备注"
  726. width="85"
  727. />
  728. <el-table-column
  729. prop="现场管理人员"
  730. label="现场管理人员"
  731. width="145"
  732. />
  733. <el-table-column
  734. prop="提交时间"
  735. label="提交时间"
  736. width="160"
  737. />
  738. <el-table-column
  739. prop="开工时间"
  740. label="开工时间"
  741. width="160"
  742. />
  743. <el-table-column
  744. prop="分钟差数"
  745. label="分钟差数"
  746. width="85"
  747. />
  748. <el-table-column
  749. prop="归属时段"
  750. label="归属时段"
  751. width="160"
  752. />
  753. </el-table>
  754. </div>
  755. </div>
  756. <template #footer>
  757. <div class="dialog-footer">
  758. <!-- <el-button @click="closeDialog">关 闭</el-button> -->
  759. <!-- <el-button type="primary" @click="xunjianerDialog">提 交</el-button> -->
  760. </div>
  761. </template>
  762. </el-dialog>
  763. <el-dialog
  764. v-model="zhichengVisible"
  765. title="制程检验记录"
  766. destroy-on-close
  767. width="1100px"
  768. style="height: 78%;"
  769. >
  770. <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
  771. <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
  772. <el-form-item label="工单编号" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  773. <el-input v-model="xunchaData.order" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  774. </el-form-item>
  775. </el-col>
  776. <el-col :span="9" style="margin-top=0px; margin-bottom: 0px;">
  777. <el-row style="margin-top=0px; margin-bottom: 0px;">
  778. <el-col style="margin-top=0px; margin-bottom: 0px;">
  779. <el-input v-model="xunchaData.product_name" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  780. </el-col>
  781. </el-row>
  782. </el-col>
  783. <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
  784. <el-form-item label="流程单" prop="id" style="margin-top=0px; margin-bottom: 0px;">
  785. <el-input v-model="xunchaData.lcdh" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  786. </el-form-item>
  787. </el-col>
  788. </el-row>
  789. <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
  790. <el-col :span="3" 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.yjno" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  793. </el-form-item>
  794. </el-col>
  795. <el-col :span="10" style="margin-top=0px; margin-bottom: 0px;">
  796. <el-row style="margin-top=0px; margin-bottom: 0px;">
  797. <el-col style="margin-top=0px; margin-bottom: 0px;">
  798. <el-input v-model="xunchaData.gxmc" :clearable="true" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
  799. </el-col>
  800. </el-row>
  801. </el-col>
  802. </el-row>
  803. <div style="display: flex;">
  804. <div style="flex: 0.1;">
  805. <el-aside width="180px" style="margin: 0;">
  806. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  807. <el-tree :data="zhichengtreeData" :props="defaultProps" highlight-current="true"
  808. @node-click="zhichengNodeClick"></el-tree>
  809. </div>
  810. </el-aside>
  811. </div>
  812. <div v-if="zhichengstatus" style="flex: 0; margin: 0;">
  813. <el-tabs v-model="activNames" type="card" @tab-click="handleClick">
  814. <el-tab-pane label="指标检验" @click="showTable('指标检验')" name="first">
  815. <el-table
  816. tooltip-effect="dark"
  817. :data="zhibiaoselectData"
  818. row-key="ID"
  819. highlight-current-row="true"
  820. :show-overflow-tooltip="true"
  821. border @row-click="dianjianhandle"
  822. style="width:100%; height:310px;"
  823. @row-dblclick="handleSelectClick"
  824. :row-class-name="rowClassName"
  825. >
  826. <el-table-column
  827. prop="检验项目"
  828. label="检验项目"
  829. width="270"
  830. />
  831. <el-table-column
  832. v-slot="scope"
  833. label="不检测"
  834. width="70"
  835. >
  836. <el-checkbox v-model="scope.row.notjc" @click="notjcClick(scope.row)"></el-checkbox>
  837. </el-table-column>
  838. <el-table-column
  839. v-slot="scope"
  840. label="合格"
  841. width="60"
  842. >
  843. <el-checkbox v-model="scope.row.zc" @click="zcClick(scope.row)"></el-checkbox>
  844. </el-table-column>
  845. <el-table-column
  846. v-slot="scope"
  847. label="不合格"
  848. width="70"
  849. >
  850. <el-checkbox v-model="scope.row.yc" @click="ycClick(scope.row)"></el-checkbox>
  851. </el-table-column>
  852. <el-table-column
  853. prop="检测方法"
  854. label="检测方法"
  855. width="90"
  856. />
  857. <el-table-column
  858. prop="检验频率"
  859. label="检验频率"
  860. width="150"
  861. />
  862. <el-table-column
  863. prop="相关标准"
  864. label="相关标准"
  865. width="180"
  866. />
  867. </el-table>
  868. </el-tab-pane>
  869. <el-tab-pane label="附加检验记录" @click="showTable('附加检验记录')" name="second">
  870. <el-table
  871. tooltip-effect="dark"
  872. :data="fujiaselectData"
  873. row-key="ID"
  874. highlight-current-row="true"
  875. :show-overflow-tooltip="true"
  876. border @row-click="dianjianhandle"
  877. style="width:100%; height:320px;"
  878. @row-dblclick="handleSelectClick"
  879. :row-class-name="rowClassName"
  880. >
  881. <el-table-column
  882. v-slot="scope"
  883. label="不检测"
  884. width="75"
  885. >
  886. <el-checkbox v-model="scope.row.notjc"></el-checkbox>
  887. </el-table-column>
  888. <el-table-column
  889. prop="缺陷备注"
  890. label="缺陷及记录"
  891. width="720"
  892. />
  893. <el-table-column
  894. prop="编号"
  895. label="编号"
  896. width="80"
  897. />
  898. </el-table>
  899. </el-tab-pane>
  900. </el-tabs>
  901. </div>
  902. </div>
  903. <template #footer>
  904. <div v-if="zhichengstatus" class="dialog-footer">
  905. <el-button @click="closezhichengDialog">关 闭</el-button>
  906. <el-button type="primary" @click="zhichengDialog">提 交</el-button>
  907. </div>
  908. </template>
  909. </el-dialog>
  910. <div v-if="dateOn" >
  911. <el-tabs v-model="activName" type="card" @tab-click="handleClick">
  912. <el-tab-pane label="当日上报产量" @click="showTable('工艺资料')" name="first">
  913. <el-table ref="multipleTable"
  914. :show-overflow-tooltip="true"
  915. :row-style="{ height: '20px' }"
  916. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  917. :header-cell-style="{ padding: '0px' }"
  918. highlight-current-row="true"
  919. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
  920. <el-table-column type="selection" width="55" />
  921. <!-- <el-table-column align="left" label="选择" prop="工单编号" width="100"/> -->
  922. <el-table-column align="left" label="产品名称" prop="产品名称" width="200"/>
  923. <el-table-column align="left" label="工序" prop="工序" width="100"/>
  924. <el-table-column align="left" label="备注" prop="备注" width="100"/>
  925. <el-table-column align="left" label="产量" prop="产量" width="70"/>
  926. <el-table-column align="left" label="千件工价" prop="千件工价" width="85"/>
  927. <el-table-column align="left" label="日定额" prop="日定额" width="85"/>
  928. <el-table-column align="left" label="补产标准" prop="补产标准" width="85"/>
  929. <el-table-column align="left" label="难度系数" prop="难度系数" width="85"/>
  930. <el-table-column align="left" label="印刷方式" prop="印刷方式" width="85"/>
  931. <el-table-column align="left" label="组员1" prop="组员1" width="170" />
  932. <el-table-column align="left" label="组员2" prop="组员2" width="170" />
  933. <el-table-column align="left" label="组员3" prop="组员3" width="170" />
  934. <el-table-column align="left" label="组员4" prop="组员4" width="170" />
  935. <el-table-column align="left" label="组员5" prop="组员5" width="70" />
  936. <el-table-column align="left" label="组员6" prop="组员6" width="70" />
  937. <el-table-column align="left" label="组员7" prop="组员7" width="70" />
  938. <el-table-column align="left" label="组员8" prop="组员8" width="70" />
  939. <el-table-column align="left" label="组员9" prop="组员9" width="70" />
  940. <el-table-column align="left" label="组员10" prop="组员10" width="70" />
  941. <el-table-column align="left" label="制程废品" prop="制程废品" width="85" />
  942. <el-table-column align="left" label="制程次品" prop="制程次品" width="85" />
  943. <el-table-column align="left" label="前工序废" prop="前工序废" width="85" />
  944. <el-table-column align="left" label="来料异常" prop="来料异常" width="85"/>
  945. <el-table-column align="left" label="装版工时" prop="装版工时" width="85" />
  946. <el-table-column align="left" label="保养工时" prop="保养工时" width="85" />
  947. <el-table-column align="left" label="打样工时" prop="打样工时" width="85"/>
  948. <el-table-column align="left" label="异常停机工时" prop="异常总工时" width="110"/>
  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="70" />
  953. <el-table-column align="left" label="主电表" prop="主电表" width="70"/>
  954. <el-table-column align="left" label="辅电表" prop="辅电表" width="70" />
  955. <el-table-column align="left" label="色度数" prop="色度数" width="70" />
  956. <el-table-column align="left" label="用户" prop="用户" width="210" />
  957. <el-table-column align="left" label="更新时间" prop="更新时间" width="160" />
  958. </el-table>
  959. </el-tab-pane>
  960. <el-tab-pane label="当日制程检验记录" @click="showTable('印件资料')" name="second">
  961. <el-table ref="multipleTable"
  962. :row-style="{ height: '20px' }"
  963. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  964. :header-cell-style="{ padding: '0px' }"
  965. :show-overflow-tooltip="true"
  966. highlight-current-row="true"
  967. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="drzcDatas" row-key="ID" @selection-change="handleSelectionChange">
  968. <el-table-column type="selection" width="55" />
  969. <el-table-column align="left" label="工单编号" prop="工单编号" width="85"/>
  970. <el-table-column align="left" label="印件号" prop="印件号" width="70" />
  971. <el-table-column align="left" label="工序名称" prop="工序名称" width="85" />
  972. <el-table-column align="left" label="检验项目" prop="检验项目" width="85"/>
  973. <el-table-column
  974. v-for="time in columnNames"
  975. :key="time"
  976. :label="time"
  977. :prop="time"
  978. align="center"
  979. width="80"
  980. ></el-table-column>
  981. </el-table>
  982. </el-tab-pane>
  983. </el-tabs>
  984. </div>
  985. <el-dialog v-model="complaintsShow" style="width: 1000px" lock-scroll :before-close="closecomplaintsShow" title="=客诉记录" destroy-on-close>
  986. <el-table ref="multipleTable"
  987. :row-style="{ height: '20px' }"
  988. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  989. :header-cell-style="{ padding: '0px' }"
  990. :show-overflow-tooltip="true"
  991. highlight-current-row="true" @row-click="complaintshandle"
  992. style="width: 100%;height: 250px;margin-top: 0px;" border tooltip-effect="dark"
  993. :data="complaintsData" row-key="ID" @selection-change="complaintsSelectionChange">
  994. <!-- <el-table-column type="selection" width="55" /> -->
  995. <el-table-column align="left" label="产品编号" prop="产品编号" width="120"/>
  996. <el-table-column align="left" label="产品名称" prop="产品名称" width="200"/>
  997. <el-table-column align="left" label="客诉日期" prop="客诉日期" width="120"/>
  998. <el-table-column align="left" label="客诉单号" prop="客诉单号" width="120"/>
  999. <el-table-column align="left" label="客诉方式" prop="客诉方式" width="100"/>
  1000. <el-table-column align="left" label="订单编号" prop="订单编号" width="100"/>
  1001. <el-table-column align="left" label="缺陷关键字" prop="缺陷关键字" width="140"/>
  1002. <el-table-column align="left" label="客诉性质" prop="客诉性质" width="100"/>
  1003. <el-table-column align="left" label="主要责任部门" prop="主要责任部门" width="140"/>
  1004. <el-table-column align="left" label="次要责任部门" prop="次要责任部门" width="140"/>
  1005. </el-table>
  1006. <el-row :gutter="20">
  1007. <el-col :span="6">
  1008. <el-form-item label="客户编号" prop="id">
  1009. <el-input v-model="selectedRowData.客户编号" :clearable="true" placeholder="" />
  1010. </el-form-item>
  1011. </el-col>
  1012. <el-col :span="15">
  1013. <el-form-item label="客户名称" prop="id">
  1014. <el-input v-model="selectedRowData.客户名称" :clearable="true" placeholder="" />
  1015. </el-form-item>
  1016. </el-col>
  1017. </el-row>
  1018. <el-row :gutter="20">
  1019. <el-col :span="6">
  1020. <el-form-item label="客诉单号" prop="id">
  1021. <el-input v-model="selectedRowData.客诉单号" :clearable="true" placeholder="" />
  1022. </el-form-item>
  1023. </el-col>
  1024. <el-col :span="5">
  1025. <el-form-item label="客诉日期" prop="id">
  1026. <el-input v-model="selectedRowData.客诉日期" :clearable="true" placeholder="" />
  1027. </el-form-item>
  1028. </el-col>
  1029. <el-col :span="5">
  1030. <el-form-item label="方式" prop="id">
  1031. <el-input v-model="selectedRowData.客诉方式" :clearable="true" placeholder="" />
  1032. </el-form-item>
  1033. </el-col>
  1034. <el-col :span="5">
  1035. <el-form-item label="批次号" prop="id">
  1036. <el-input v-model="selectedRowData.订单编号" :clearable="true" placeholder="" />
  1037. </el-form-item>
  1038. </el-col>
  1039. </el-row>
  1040. <el-row :gutter="20">
  1041. <el-col :span="20">
  1042. <el-form-item label="反馈问题" prop="id">
  1043. <el-input v-model="selectedRowData.客诉描述" :clearable="true" placeholder="" />
  1044. </el-form-item>
  1045. </el-col>
  1046. </el-row>
  1047. <el-row :gutter="20">
  1048. <el-col :span="20">
  1049. <el-form-item label="缺陷关键字" prop="id">
  1050. <el-input v-model="selectedRowData.缺陷关键字" :clearable="true" placeholder="" />
  1051. </el-form-item>
  1052. </el-col>
  1053. </el-row>
  1054. <el-row :gutter="20">
  1055. <el-col :span="5">
  1056. <el-form-item label="性质" prop="id">
  1057. <el-input v-model="selectedRowData.客诉性质" :clearable="true" placeholder="" />
  1058. </el-form-item>
  1059. </el-col>
  1060. <el-col :span="5">
  1061. <el-form-item label="扣分" prop="id">
  1062. <el-input v-model="selectedRowData.扣分" :clearable="true" placeholder="" />
  1063. </el-form-item>
  1064. </el-col>
  1065. </el-row>
  1066. <div style="display: flex;">
  1067. </div>
  1068. </el-dialog>
  1069. <el-dialog
  1070. v-model="huanxingVisible"
  1071. title="换型清场"
  1072. destroy-on-close
  1073. width="1100px"
  1074. style="height: 78%;"
  1075. >
  1076. <div style="display: flex;">
  1077. <div style="flex: 0.1;">
  1078. <el-aside width="180px" style="margin: 0;">
  1079. <div class="JKWTree-tree" style="height: 55vh; border-right: 1px solid #ebeef5;">
  1080. <el-tree :data="huanxingtreeData" :props="defaultProps" highlight-current="true"
  1081. @node-click="huanxingNodeClick"></el-tree>
  1082. </div>
  1083. </el-aside>
  1084. </div>
  1085. <div v-if="huanxingstatus" style="flex: 0; margin: 0;">
  1086. <el-tabs v-model="activNames" type="card" @tab-click="handleClick">
  1087. <el-tab-pane label="换型清场明细信息" @click="showTable('换型清场明细信息')" name="first">
  1088. </el-tab-pane>
  1089. <el-tab-pane label="当前设备换型记录" style="width: 110%;" @click="showTable('当前设备换型记录')" name="second">
  1090. <el-table
  1091. tooltip-effect="dark"
  1092. :data="huanxingselectData"
  1093. row-key="ID"
  1094. highlight-current-row="true"
  1095. :show-overflow-tooltip="true"
  1096. border @row-click="dianjianhandle"
  1097. style="width:30%; height:50vh;"
  1098. @row-dblclick="handleSelectClick"
  1099. :row-class-name="rowClassName"
  1100. >
  1101. <el-table-column
  1102. prop="日期"
  1103. label="日期"
  1104. width="160"
  1105. />
  1106. <el-table-column
  1107. prop="机台编号"
  1108. label="机台编号"
  1109. width="90"
  1110. />
  1111. <el-table-column
  1112. prop="班组"
  1113. label="班组"
  1114. width="70"
  1115. />
  1116. <el-table-column
  1117. prop="工单编号A"
  1118. label="工单编号A"
  1119. width="95"
  1120. />
  1121. <el-table-column
  1122. prop="印件名称A"
  1123. label="印件名称A"
  1124. width="130"
  1125. />
  1126. <el-table-column
  1127. prop="印件工序A"
  1128. label="印件工序A"
  1129. width="150"
  1130. />
  1131. <el-table-column
  1132. prop="码包号A"
  1133. label="码包号A"
  1134. width="80"
  1135. />
  1136. <el-table-column
  1137. prop="工单编号B"
  1138. label="工单编号B"
  1139. width="100"
  1140. />
  1141. <el-table-column
  1142. prop="印件名称B"
  1143. label="印件名称B"
  1144. width="100"
  1145. />
  1146. <el-table-column
  1147. prop="印件工序B"
  1148. label="印件工序B"
  1149. width="150"
  1150. />
  1151. <el-table-column
  1152. prop="码包号B"
  1153. label="码包号B"
  1154. width="80"
  1155. />
  1156. <el-table-column
  1157. prop="清场项目A"
  1158. label="菲林_标样_签样品_留样品"
  1159. width="190"
  1160. />
  1161. <el-table-column
  1162. prop="清场项目B"
  1163. label="版材_纸张_电化铝_油墨"
  1164. width="190"
  1165. />
  1166. <el-table-column
  1167. prop="清场项目C"
  1168. label="过版纸_废品_次品"
  1169. width="170"
  1170. />
  1171. <el-table-column
  1172. prop="清场项目D"
  1173. label="半成品_成品_零头"
  1174. width="170"
  1175. />
  1176. <el-table-column
  1177. prop="清场项目E"
  1178. label="操作台桌面_抽屉_地面"
  1179. width="180"
  1180. />
  1181. <el-table-column
  1182. prop="机长"
  1183. label="机长"
  1184. width="80"
  1185. />
  1186. <el-table-column
  1187. prop="班长"
  1188. label="带班长"
  1189. width="80"
  1190. />
  1191. <el-table-column
  1192. prop="质量巡查员"
  1193. label="质量巡查员"
  1194. width="100"
  1195. />
  1196. <el-table-column
  1197. prop="创建时间"
  1198. label="创建时间"
  1199. width="120"
  1200. />
  1201. <el-table-column
  1202. prop="UNIQID"
  1203. label="UNIQID"
  1204. width="80"
  1205. />
  1206. </el-table>
  1207. </el-tab-pane>
  1208. </el-tabs>
  1209. </div>
  1210. </div>
  1211. </el-dialog>
  1212. <Shebeizhuangtai
  1213. v-if="dialogSbyxgl"
  1214. v-model="dialogSbyxgl"
  1215. title="【01.30 08:30】【JY01#--海德堡对开八色平版胶印机(JY08-01)】【2311116-->钻石(荷花)盒包装纸】【01--胶印】"
  1216. :formData="formData"
  1217. />
  1218. </el-main>
  1219. </el-container>
  1220. </el-container>
  1221. </div>
  1222. </template>
  1223. <script setup>
  1224. import {
  1225. createCompany,
  1226. deleteCompany,
  1227. deleteCompanyByIds,
  1228. updateCompany,
  1229. findCompany,
  1230. getCompanyList
  1231. } from '@/api/company'
  1232. import {
  1233. facilityTab,
  1234. facilitychanLiang,
  1235. facilityInspect,
  1236. facilityProduction,
  1237. facilityTeam,
  1238. facilityMachineList,
  1239. facilitySpotCheckItem,
  1240. facilityInspectionItem,
  1241. reportProduceInfo,
  1242. reportName,
  1243. reportInfo,
  1244. reportMachineMac,
  1245. facilityWorklist,
  1246. setProcessStatus,
  1247. submitDailyProduction,
  1248. facilityDetail,
  1249. inspectionRecord,
  1250. getYg,
  1251. facilityProcedure,
  1252. facilityPrintGetTab,
  1253. facilityPrintDetail,
  1254. ProcessInspectionRecordsItem,
  1255. MachineDetailList,
  1256. ComplaintRecord,
  1257. remodelGetTab,
  1258. ModelChangeRecord
  1259. } from '@/api/jixiaoguanli/jitairibaobiao'
  1260. import {
  1261. FieldInspectionRecord
  1262. } from "@/api/mes/job";
  1263. import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue'
  1264. // 全量引入格式化工具 请按需保留
  1265. import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
  1266. import { ElMessage, ElMessageBox } from 'element-plus'
  1267. import { ref, reactive } from 'vue'
  1268. defineOptions({
  1269. name: 'Company'
  1270. })
  1271. const gytableData = ref([])
  1272. const drzcDatas =ref([])
  1273. const detailData = reactive([])
  1274. const treeData=ref([])
  1275. const yinbantreeData=ref([])
  1276. let dianjiantreeData;
  1277. let JTMC=ref()
  1278. let date=ref()
  1279. let JTMCOn=ref()
  1280. let dateOn=ref()
  1281. const activName = ref('first')
  1282. let productCode=ref()
  1283. const sbzyData = reactive([])
  1284. const FPData = reactive([])
  1285. const CLMXData = reactive([])
  1286. let JYData = reactive([])
  1287. const selectData = ref([])
  1288. const handleNodeClick = (nodeData,node) => {
  1289. //存放当前节点的nodeId
  1290. if (nodeData.level === 1) {
  1291. console.log(node.label); // 第一级节点
  1292. } else if (nodeData.level === 2) {
  1293. console.log(node.label); // 第二级节点
  1294. JTMC=node.label.split("-")[0]
  1295. JTMCOn.value=true
  1296. dateOn.value=false
  1297. FacilityProduction()
  1298. FacilityWorklist()
  1299. // FacilityTeam(JTMC)
  1300. // console.log('123')
  1301. // console.log(JTMC)
  1302. } else if (nodeData.level === 3) {
  1303. JTMC=nodeData.machineName.split("-")[0]
  1304. JTMCOn.value=false
  1305. dateOn.value=true
  1306. date=node.label
  1307. gytableData.value=[]
  1308. drzcDatas.value=[]
  1309. columnNames=[]
  1310. drzcData=[]
  1311. FacilityInspect()
  1312. FacilitychanLiang()
  1313. // FacilityTeam(JTMC)
  1314. // InspectionRecord()
  1315. // FacilityDetail()
  1316. console.log(node.label); // 第三级节点
  1317. }
  1318. }
  1319. //当前生产订单
  1320. const FacilityProduction = async () => {
  1321. const response = await facilityProduction({machine:JTMC});
  1322. if (response.code === 0) {
  1323. console.log(response)
  1324. // 填充formData对象的基本字段
  1325. formData.value.工单编号 = response.data.工单编号;
  1326. formData.value.印件编号 = response.data.印件号;
  1327. formData.value.工序名称 = response.data.工序名称;
  1328. formData.value.产品名称 = response.data.产品名称;
  1329. formData.value.班组 = response.data.班组编号;
  1330. let sczl_bhkey=''
  1331. let sczl_namekey=''
  1332. if (response.data.班组成员) {
  1333. for (let i = 1; i <= Math.min(Object.keys(response.data.班组成员).length, 6); i++) {
  1334. sczl_bhkey=`sczl_bh${i}`
  1335. sczl_namekey=`sczl_name${i}`
  1336. formData.value[sczl_bhkey] = response.data.班组成员[i]['编号'];
  1337. formData.value[sczl_namekey] = response.data.班组成员[i]['姓名'];
  1338. }
  1339. }
  1340. formData.value.JTMC=JTMC
  1341. const responses = await MachineDetailList({workshop:'胶印车间'});
  1342. if(responses.code===0){
  1343. responses.data.map(item=>{
  1344. if(item.设备编号==JTMC){
  1345. formData.value.status=item.状态
  1346. }
  1347. })
  1348. }
  1349. // console.log(formData.value.工单编号)
  1350. }
  1351. // getTableData()
  1352. }
  1353. let CJMC=ref()
  1354. //设备工作清单
  1355. const FacilityWorklist = async () => {
  1356. const response = await facilityWorklist({machine:JTMC});
  1357. if (response.code === 0) {
  1358. console.log(response)
  1359. sbzyData.splice(0, sbzyData.length, ...response.data);
  1360. const res = await facilityProcedure({ Gd_gdbh: sbzyData[0]['工单编号|质量信息'].substring(0, 7) })
  1361. formData.value.productCode= response.data[0]['产品代号']
  1362. console.log(res)
  1363. if (res.code === 0) {
  1364. selectData.value = res.data
  1365. }
  1366. console.log('22222222')
  1367. FacilityTeam(JTMC)
  1368. }
  1369. }
  1370. //检验记录
  1371. const InspectionRecord = async () => {
  1372. console.log(formData.value.班组)
  1373. // const response = await inspectionRecord({machine:JTMC,Gd_gdbh:formData.value.工单编号,team:formData.value.班组});
  1374. const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2311114',team:'A班'});
  1375. // const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2312191',team:'A班'});
  1376. console.log(response)
  1377. if(response.code==0){
  1378. // 提取 inspectiontime 作为列名
  1379. // Extract inspectiontime as columnNames
  1380. columnNames = response.data.inspectiontime;
  1381. // Populate drzcData with row data
  1382. for (const key in response.data) {
  1383. if (key !== 'inspectiontime') {
  1384. const item = response.data[key];
  1385. const rowData = {
  1386. '工单编号': item['工单编号'],
  1387. '印件号': item['印件号'],
  1388. '工序名称': item['工序名称'],
  1389. '检验项目': item['检验项目']
  1390. };
  1391. // Initialize time columns with '—'
  1392. columnNames.forEach(time => {
  1393. rowData[time] = '';
  1394. });
  1395. // Split inspectresult and fill the corresponding time columns
  1396. const results = item['inspectresult'].split(',');
  1397. results.forEach(result => {
  1398. if (columnNames.includes(result)) {
  1399. rowData[result] = '√';
  1400. }else{rowData[result] = ''}
  1401. });
  1402. // Add the row data to drzcData
  1403. JYData.push(rowData);
  1404. }
  1405. }
  1406. console.log(JYData);
  1407. }
  1408. }
  1409. //当班产量明细
  1410. const FacilityDetail = async () => {
  1411. console.log('123123')
  1412. console.log(JTMC)
  1413. console.log('123123')
  1414. console.log(formData.value.工单编号)
  1415. console.log('123123')
  1416. console.log(formData.value.班组)
  1417. // const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team: formData.value.班组 });
  1418. const response = await facilityDetail({ machine: 'JY01#', Gd_gdbh: '2312191', team: 'A班' });
  1419. // const response = await facilityDetail({ machine: JTMC, Gd_gdbh: '2311114', team:'A班' });
  1420. if (response.code === 0) {
  1421. console.log('123123')
  1422. console.log(response);
  1423. CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
  1424. }
  1425. };
  1426. //员工编号回车事件
  1427. const getygsubmit = (event, inputName) => {
  1428. console.log(inputName)
  1429. let combinedString = 'sczl_bh' + inputName;
  1430. console.log(combinedString)
  1431. // let variableName = 'sczl_gdbh'+inputName;
  1432. let variableValue = eval('formData3.value.' + combinedString);
  1433. console.log(variableValue)
  1434. GetYg(variableValue,inputName)
  1435. }
  1436. //获取员工信息
  1437. const GetYg = async (value,inputName) => {
  1438. const response = await getYg({sczl_bh:value});
  1439. console.log(response)
  1440. if (response.code === 0) {
  1441. console.log(response.data.ygxm)
  1442. let Bname = 'sczl_name' + inputName;
  1443. formData3.value[Bname]=response.data.ygxm
  1444. // console.log(formData.value[Bname])
  1445. }
  1446. }
  1447. // 验证规则
  1448. const rule = reactive({
  1449. })
  1450. const searchRule = reactive({
  1451. createdAt: [
  1452. { validator: (rule, value, callback) => {
  1453. if (searchInfo.value.startCreatedAt && !searchInfo.value.endCreatedAt) {
  1454. callback(new Error('请填写结束日期'))
  1455. } else if (!searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt) {
  1456. callback(new Error('请填写开始日期'))
  1457. } else if (searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt && (searchInfo.value.startCreatedAt.getTime() === searchInfo.value.endCreatedAt.getTime() || searchInfo.value.startCreatedAt.getTime() > searchInfo.value.endCreatedAt.getTime())) {
  1458. callback(new Error('开始日期应当早于结束日期'))
  1459. } else {
  1460. callback()
  1461. }
  1462. }, trigger: 'change' }
  1463. ],
  1464. })
  1465. const elFormRef = ref()
  1466. const elSearchFormRef = ref()
  1467. // =========== 表格控制部分 ===========
  1468. const page = ref(1)
  1469. const total = ref(0)
  1470. const pageSize = ref(10)
  1471. const tableData = ref([])
  1472. const searchInfo = ref({})
  1473. const xunchaVisible = ref(false)
  1474. const xunchatreeData=ref([{label: '现场巡查记录',} ])
  1475. // 重置
  1476. const onReset = () => {
  1477. searchInfo.value = {}
  1478. getTableData()
  1479. }
  1480. // 搜索
  1481. const onSubmit = () => {
  1482. elSearchFormRef.value?.validate(async(valid) => {
  1483. if (!valid) return
  1484. page.value = 1
  1485. pageSize.value = 10
  1486. getTableData()
  1487. })
  1488. }
  1489. // 分页
  1490. const handleSizeChange = (val) => {
  1491. pageSize.value = val
  1492. getTableData()
  1493. }
  1494. // 修改页面容量
  1495. const handleCurrentChange = (val) => {
  1496. page.value = val
  1497. getTableData()
  1498. }
  1499. const getTableData = async () => {
  1500. const response = await facilityTab();
  1501. if (response.code === 0 && response.data) {
  1502. const workshops = response.data; // 车间数据
  1503. // 在推送新项之前将 treeData 重置为空数组
  1504. treeData.value = []; // 使用 .value 访问响应式引用的值
  1505. for (const workshopName in workshops) {
  1506. const workshopNode = {
  1507. label: workshopName,
  1508. children: [],
  1509. level: 1 // 添加层级属性
  1510. };
  1511. const machines = workshops[workshopName]; // 车间下的机器
  1512. for (const machineName in machines) {
  1513. const machineNode = {
  1514. label: machineName,
  1515. children: [],
  1516. level: 2, // 添加层级属性
  1517. parentNode: workshopNode
  1518. };
  1519. // Now that machineNode is initialized, you can refer to it
  1520. const childrenNodes = machines[machineName].map(dateTime => {
  1521. const dateOnly = dateTime.split(' ')[0];
  1522. return {
  1523. label: dateOnly,
  1524. machineName:machineName,
  1525. level: 3, // 添加层级属性
  1526. parentNode: machineNode
  1527. };
  1528. });
  1529. // Assign the childrenNodes to the machineNode's children property
  1530. machineNode.children = childrenNodes;
  1531. // Finally, push the machineNode to the workshopNode's children array
  1532. workshopNode.children.push(machineNode);
  1533. }
  1534. // 将 workshopNode 推送到响应式 treeData 数组
  1535. treeData.value.push(workshopNode);
  1536. }
  1537. }
  1538. };
  1539. // 查询
  1540. const getTableList = async() => {
  1541. const table = await getCompanyList({ page: page.value, pageSize: pageSize.value, ...searchInfo.value })
  1542. if (table.code === 0) {
  1543. tableData.value = table.data.list
  1544. total.value = table.data.total
  1545. page.value = table.data.page
  1546. pageSize.value = table.data.pageSize
  1547. }
  1548. }
  1549. getTableData()
  1550. //删除
  1551. function onDel() {
  1552. }
  1553. //制程检验
  1554. const zhichengstatus=ref(false)
  1555. const xunchaData = ref([]);
  1556. const zhichengVisible = ref(false)
  1557. const zhichengtreeData=ref([{
  1558. label: '首件与过程确认'
  1559. },{
  1560. label: '机台检验'
  1561. },{
  1562. label: 'IPQC检验'
  1563. }])
  1564. const onzhicheng = async () => {
  1565. zhichengstatus.value=false
  1566. xunchaData.value=[]
  1567. const response = await reportProduceInfo({machine:JTMC.split("#")[0]});
  1568. if (response.code === 0) {
  1569. xunchaData.value.order=response.data.order
  1570. xunchaData.value.yjno=response.data.yjno
  1571. xunchaData.value.product_name=response.data.product_name
  1572. xunchaData.value.gxmc=response.data.gxmc
  1573. xunchaData.value.lcdh=0
  1574. xunchaData.value.sczl_bh=''
  1575. xunchaData.value.sczl_name=''
  1576. xunchaData.value.remark=''
  1577. zhichengVisible.value = true;
  1578. }
  1579. }
  1580. const category =ref()
  1581. const zhibiaoselectData=ref([])
  1582. const fujiaselectData=ref([])
  1583. const zhichengNodeClick = (node, check) => {
  1584. if(node.label){
  1585. zhichengstatus.value=true
  1586. category.value=node.label
  1587. processInspectionRecordsItem()
  1588. }
  1589. };
  1590. const processInspectionRecordsItem = async (value) => {
  1591. const response = await ProcessInspectionRecordsItem({ process: xunchaData.value.gxmc });
  1592. if (response.code === 0) {
  1593. zhibiaoselectData.value=response.data.首件.指标检验.map(item=>{
  1594. item.notjc=true;
  1595. item.zc=false;
  1596. item.yc=false;
  1597. item.remark=''
  1598. item.category=category.value
  1599. item.workOrder=xunchaData.value.order
  1600. item.yjno=xunchaData.value.yjno
  1601. item.flow=xunchaData.value.lcdh
  1602. item.team=BZMC.value
  1603. item.machine=JTMC.split("#")[0]
  1604. return item
  1605. })
  1606. fujiaselectData.value=response.data.首件.附加.map(item=>{
  1607. item.notjc=true;
  1608. item.workOrder=xunchaData.value.order
  1609. item.yjno=xunchaData.value.yjno
  1610. item.flow=xunchaData.value.lcdh
  1611. item.machine=JTMC.split("#")[0]
  1612. return item
  1613. })
  1614. }
  1615. };
  1616. //设置机台状态
  1617. const dialogSbyxgl=ref(false)
  1618. function onstatus() {
  1619. dialogSbyxgl.value=true
  1620. SetMachineStatus()
  1621. // ReportProduceInfo()
  1622. }
  1623. //设置机台状态
  1624. const SetMachineStatus = async () => {
  1625. // const response = await setMachineStatus({
  1626. // machine:'JY03',
  1627. // gy_name:'02-胶印〖白、黑、哑油【预干】、NT光油',
  1628. // order:'2311114',
  1629. // yjno:'1',
  1630. // class:'ZM00545,ZM01351,ZM01170',
  1631. // status:'维修',
  1632. // production_now:'',
  1633. // production_all:'',
  1634. // });
  1635. // if (response.code === 0) {
  1636. // }
  1637. }
  1638. //客诉记录
  1639. const complaintsShow = ref(false)
  1640. const complaintsData = reactive([])
  1641. function oncomplaints() {
  1642. Complaints()
  1643. }
  1644. // 客诉记录表格填充
  1645. const Complaints = async() => {
  1646. // console.log(sbzyData[0].产品代号)
  1647. // console.log(sbzyData[0].产品代号)
  1648. // console.log(sbzyData[0].产品代号)
  1649. // const res = await ComplaintRecord({productCode :cpcode.value})
  1650. const res = await ComplaintRecord({productCode :'100601011'})
  1651. if (res.code === 0) {
  1652. if(res.data==null){
  1653. console.log('暂无客诉记录')
  1654. }else{
  1655. complaintsData.splice(0, complaintsData.length, ...res.data);
  1656. console.log(complaintsData);
  1657. console.log(complaintsData[0].产品编号)
  1658. selectedRowData.value=complaintsData[0]
  1659. console.log(selectedRowData)
  1660. complaintsShow.value=true
  1661. }
  1662. }
  1663. }
  1664. const selectedRowData = ref({
  1665. })
  1666. //客诉表格单击
  1667. const complaintshandle = (val, row) => {
  1668. console.log(val)
  1669. selectedRowData.value=val
  1670. };
  1671. //换型清场
  1672. const huanxingVisible = ref(false)
  1673. const huanxingtreeData=ref([])
  1674. const huanxingselectData = ref([])
  1675. const huanxingstatus=ref(false)
  1676. const activNames=ref('first')
  1677. function onClear() {
  1678. huanxingVisible.value=true
  1679. RemodelGetTab()
  1680. }
  1681. const RemodelGetTab = async() => {
  1682. const response = await remodelGetTab()
  1683. let arr=[]
  1684. if (response.code === 0) {
  1685. for(let key in response.data){
  1686. if(response.data[key][0]){
  1687. let children =[]
  1688. for (let i = 0; i < response.data[key].length; i++) {
  1689. children.push({label:response.data[key][i],machine:key})
  1690. }
  1691. arr.push({
  1692. label:key,
  1693. children:children
  1694. })
  1695. console.log(response.data[key].length)
  1696. }else{
  1697. arr.push({label:key})
  1698. }
  1699. }
  1700. huanxingtreeData.value=arr
  1701. }
  1702. }
  1703. const huanxingNodeClick = (node) => {
  1704. //存放当前节点的nodeId
  1705. if(node.machine){
  1706. huanxingstatus.value=true
  1707. modelChangeRecord(node.machine)
  1708. }else{
  1709. console.log('2')
  1710. }
  1711. }
  1712. const modelChangeRecord = async (val) => {
  1713. const response = await ModelChangeRecord({machine:val});
  1714. if (response.code === 0) {
  1715. huanxingselectData.value=response.data
  1716. }
  1717. }
  1718. import { nextTick } from 'vue';
  1719. //设备点检
  1720. function ondianjian() {
  1721. getSpotCheckItem(JTMC).then(treeData => {
  1722. if (treeData) {
  1723. // 如果获取成功,treeData 就是我们需要的树形结构数据
  1724. dianjiantreeData = treeData;
  1725. console.log('222');
  1726. console.log(dianjiantreeData);
  1727. // 使用 nextTick 来确保在更新 dianjianVisible 后立即刷新视图
  1728. nextTick(() => {
  1729. dianjianVisible.value = true;
  1730. });
  1731. // 这里可以处理treeData,例如将其赋值给某个状态管理变量或者用于渲染界面
  1732. } else {
  1733. // 如果获取失败,则treeData为null
  1734. console.log('获取巡检项目树形结构数据失败');
  1735. }
  1736. });
  1737. }
  1738. const onyinban = async() => {
  1739. const res = await facilityPrintGetTab({productCode:formData.value.productCode})
  1740. if(res.code===0){
  1741. yinbantreeData.value=[{
  1742. label:'产品印版库',
  1743. children:res.data.map(item=>({
  1744. label:item.印版分类,
  1745. code:item.编号
  1746. }))
  1747. }]
  1748. console.log(res.data.map(item=>({
  1749. label:item.印版分类,
  1750. code:item.编号
  1751. })))
  1752. yinbanVisible.value = true;
  1753. }
  1754. }
  1755. const onxuncha = async() => {
  1756. xunchaVisible.value=true
  1757. }
  1758. //获取设备点检->检验项目
  1759. // const FacilityInspectionItem = async (value) => {
  1760. // try {
  1761. // // 调用接口获取巡检项目数据
  1762. // const response = await facilityInspectionItem({ unitName: value });
  1763. // // 检查接口返回的状态码
  1764. // if (response.code === 0) {
  1765. // dianjianselectData.splice(0, dianjianselectData.length, ...response.data.map(item=>{
  1766. // item.notjc=true;
  1767. // item.zc=false;
  1768. // item.yc=false;
  1769. // return item
  1770. // }))
  1771. // console.log(dianjianselectData)
  1772. // }
  1773. // } catch (error) {
  1774. // // 捕获并打印异常
  1775. // console.error("获取巡检项目数据出错:" + error);
  1776. // return null;
  1777. // }
  1778. // };
  1779. //获取设备点检->检验项目
  1780. const FacilityInspectionItem = async (value) => {
  1781. try {
  1782. // 调用接口获取巡检项目数据
  1783. const response = await facilityInspectionItem({ unitName: value ,machine:JTMC.split("#")[0]});
  1784. // 检查接口返回的状态码
  1785. if (response.code === 0) {
  1786. console.log(response)
  1787. dianjianselectData.splice(0, dianjianselectData.length, ...response.data.map(item=>{
  1788. item.notjc=true;
  1789. item.zc=false;
  1790. item.yc=false;
  1791. item.remark=''
  1792. item.unitName=value
  1793. item.team=BZMC.value
  1794. item.machine=JTMC
  1795. return item
  1796. }))
  1797. }
  1798. } catch (error) {
  1799. // 捕获并打印异常
  1800. console.error("获取巡检项目数据出错:" + error);
  1801. return null;
  1802. }
  1803. };
  1804. //机台印版领用->右侧详情
  1805. const facilityPrintDetailItem = async (value) => {
  1806. try {
  1807. // 调用接口获取巡检项目数据
  1808. // const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:productCode.value });
  1809. const response = await facilityPrintDetail({ workOrder: '2312165',code:'0521',productCode:'104601001' });
  1810. // 检查接口返回的状态码
  1811. if (response.code === 0) {
  1812. console.log(response)
  1813. yinbanselectData.value=response.data
  1814. }
  1815. } catch (error) {
  1816. // 捕获并打印异常
  1817. console.error("获取数据出错:" + error);
  1818. return null;
  1819. }
  1820. };
  1821. //树形结构单机
  1822. const dianjianselectData = reactive([])
  1823. const yinbanselectData = ref([])
  1824. const xunchaselectData = ref([])
  1825. const dianjianNodeClick = (node, check, nodeData) => {
  1826. if (node.children && node.children.length > 0) {
  1827. // 点击的是父节点,且有子节点
  1828. // 执行相应的父节点单击事件处理逻辑
  1829. // 这里可以添加你想要的处理逻辑,比如展开/折叠节点等
  1830. } else {
  1831. // 点击的是子节点,或者没有子节点
  1832. // 执行相应的子节点单击事件处理逻辑
  1833. console.log(node.label)
  1834. console.log(JTMC.split("#")[0])
  1835. // FacilityInspectionItem({unitName:node.label ,machine:JTMC.split("#")[0]})
  1836. FacilityInspectionItem(node.label,)
  1837. }
  1838. };
  1839. const yinbanNodeClick = (node, check, nodeData) => {
  1840. if (node.children && node.children.length > 0) {
  1841. // 点击的是父节点,且有子节点
  1842. // 执行相应的父节点单击事件处理逻辑
  1843. // 这里可以添加你想要的处理逻辑,比如展开/折叠节点等
  1844. } else {
  1845. // 点击的是子节点,或者没有子节点
  1846. // 执行相应的子节点单击事件处理逻辑
  1847. facilityPrintDetailItem(node.code)
  1848. }
  1849. };
  1850. const xunchaNodeClick = (node, check, nodeData) => {
  1851. if(node){
  1852. fieldInspectionRecord()
  1853. }
  1854. }
  1855. const fieldInspectionRecord = async () => {
  1856. const response = await FieldInspectionRecord({ workOrder: '2311114',team:'A班',start:'2024-01-19 08:30:00' });
  1857. if (response.code === 0) {
  1858. xunchaselectData.value=response.data
  1859. }
  1860. }
  1861. let pandingfangfa=ref()
  1862. //检验项目单击
  1863. const dianjianhandle = (val, row) => {
  1864. try {
  1865. pandingfangfa.value = val.判定标准;
  1866. } catch (error) {
  1867. console.error('An error occurred:', error);
  1868. }
  1869. };
  1870. const notjcClick = (val) => {
  1871. try {
  1872. if(val.notjc==false){
  1873. val.zc=true
  1874. }else{
  1875. val.zc=false
  1876. val.yc==false
  1877. }
  1878. } catch (error) {
  1879. console.error('An error occurred:', error);
  1880. }
  1881. };
  1882. const zcClick = (val) => {
  1883. try {
  1884. if(val.zc==false){
  1885. val.zc=true
  1886. }else{
  1887. val.zc=false
  1888. val.yc==false
  1889. }
  1890. } catch (error) {
  1891. console.error('An error occurred:', error);
  1892. }
  1893. };
  1894. const ycClick = (val) => {
  1895. try {
  1896. if(val.yc==false){
  1897. val.zc=true
  1898. }else{
  1899. val.zc=false
  1900. val.notjc==false
  1901. }
  1902. } catch (error) {
  1903. console.error('An error occurred:', error);
  1904. }
  1905. };
  1906. const rowClassName = (row, column) => {
  1907. try {
  1908. if (row.unchecked) {
  1909. return 'row-yellow';
  1910. }
  1911. return '';
  1912. } catch (error) {
  1913. console.error('An error occurred:', error);
  1914. return '';
  1915. }
  1916. };
  1917. // 异步函数,用于获取指定设备的巡检项目,并且将结果格式化为树形结构数据
  1918. const getSpotCheckItem = async (machineName) => {
  1919. try {
  1920. // 调用接口获取巡检项目数据
  1921. const response = await facilitySpotCheckItem({ machine: machineName });
  1922. // 检查接口返回的状态码
  1923. if (response.code === 0) {
  1924. // 构建树形结构数据
  1925. const childrenData = Object.entries(response.data).map(([id, label]) => {
  1926. return {
  1927. id, // 子节点的唯一标识
  1928. label, // 子节点的标签
  1929. children: [] // 初始化子节点数组
  1930. };
  1931. });
  1932. // 创建包含父节点的树形结构数据
  1933. const treeData = [{
  1934. id: machineName, // 父节点的唯一标识
  1935. label: machineName, // 父节点的标签
  1936. children: childrenData // 子节点数据
  1937. }];
  1938. // 返回构建好的树形结构数据
  1939. return treeData;
  1940. } else {
  1941. // 如果接口返回的状态码不是0,打印错误信息
  1942. console.error("接口返回错误:" + response.msg);
  1943. return null;
  1944. }
  1945. } catch (error) {
  1946. // 捕获并打印异常
  1947. console.error("获取巡检项目数据出错:" + error);
  1948. return null;
  1949. }
  1950. };
  1951. // 班组人员及分配比例
  1952. const FacilityTeam = async (value) => {
  1953. const response = await facilityTeam({ machine: value });
  1954. if (response.code === 0) {
  1955. // formData.value.班组 = response.data[0]['班组号'];
  1956. BZMC.value=response.data[0]['班组号']
  1957. // if(response.data[0][2]){
  1958. // // console.log(response.data[0][2].split(' '));
  1959. // for (let i = 1; i <= 3; i++) {
  1960. // const sczl_bh = `sczl_bh${i}`;
  1961. // const sczl_name = `sczl_name${i}`;
  1962. // formData.value[sczl_bh] = response.data[0][i-1].split(' ')[0];
  1963. // formData.value[sczl_name] = response.data[0][i-1].split(' ')[1];
  1964. // }
  1965. // }
  1966. // if(response.data[0][0]){
  1967. // // console.log(response.data[0][2].split(' '));
  1968. // for (let i = 1; i <= 1; i++) {
  1969. // const sczl_bh = `sczl_bh${i}`;
  1970. // const sczl_name = `sczl_name${i}`;
  1971. // formData.value[sczl_bh] = response.data[0][i-1].split(' ')[0];
  1972. // formData.value[sczl_name] = response.data[0][i-1].split(' ')[1];
  1973. // }
  1974. // }
  1975. // if(response.data[0][1]){
  1976. // // console.log(response.data[0][2].split(' '));
  1977. // for (let i = 1; i <= 2; i++) {
  1978. // const sczl_bh = `sczl_bh${i}`;
  1979. // const sczl_name = `sczl_name${i}`;
  1980. // formData.value[sczl_bh] = response.data[0][i-1].split(' ')[0];
  1981. // formData.value[sczl_name] = response.data[0][i-1].split(' ')[1];
  1982. // }
  1983. // }
  1984. // if(response.data[0][3]){
  1985. // // console.log(response.data[0][2].split(' '));
  1986. // for (let i = 1; i <= 4; i++) {
  1987. // const sczl_bh = `sczl_bh${i}`;
  1988. // const sczl_name = `sczl_name${i}`;
  1989. // formData.value[sczl_bh] = response.data[0][i-1].split(' ')[0];
  1990. // formData.value[sczl_name] = response.data[0][i-1].split(' ')[1];
  1991. // }
  1992. // }
  1993. InspectionRecord()
  1994. FacilityDetail()
  1995. // 清空 bzData 数组
  1996. bzData.splice(0, bzData.length);
  1997. // 遍历接口返回的数据,并给每个对象添加 JTMC 属性
  1998. const updatedData = response.data.map(item => {
  1999. return { ...item, JTMC: value }; // 添加 JTMC 属性
  2000. });
  2001. // 将更新后的数据添加到 bzData 数组
  2002. bzData.push(...updatedData);
  2003. FPData.push(...updatedData)
  2004. return 1
  2005. }
  2006. };
  2007. //班组维护
  2008. function onBZ() {
  2009. FacilityTeam(JTMC)
  2010. fetchData()
  2011. detailShow.value=true
  2012. console.log('2222')
  2013. }
  2014. const currentBz ={}
  2015. const selectBz = async() => {
  2016. if(currentBz.value){
  2017. BZMC.value=currentBz.value.班组号
  2018. let sczl_bhkey=''
  2019. let sczl_namekey=''
  2020. if (currentBz.value) {
  2021. for (let i = 1; i <= 6; i++) {
  2022. sczl_bhkey=`sczl_bh${i}`
  2023. sczl_namekey=`sczl_name${i}`
  2024. formData.value[sczl_bhkey] = '';
  2025. formData.value[sczl_namekey] = '';
  2026. }
  2027. for (let i = 1; i <= Math.min(Object.keys(currentBz.value).length-4, 6); i++) {
  2028. sczl_bhkey=`sczl_bh${i}`
  2029. sczl_namekey=`sczl_name${i}`
  2030. console.log(currentBz.value[i-1].split(' '))
  2031. formData.value[sczl_bhkey] = currentBz.value[i-1].split(' ')[0];
  2032. formData.value[sczl_namekey] = currentBz.value[i-1].split(' ')[1];
  2033. classbz.value[i-1]=currentBz.value[i-1].split(' ')[0]
  2034. }
  2035. formData.value.class=classbz.value.join(',')
  2036. }
  2037. currentBz.value={}
  2038. }
  2039. }
  2040. // 下拉框选项数据
  2041. const dropdownOptions = ref([]);
  2042. // 选中的选项
  2043. const selectedOption = ref('');
  2044. // 获取接口数据并转换为下拉框需要的格式
  2045. const fetchData = async () => {
  2046. try {
  2047. // Simulate API call
  2048. const response = await facilityMachineList();
  2049. if (response.code === 0) {
  2050. // Transform data format
  2051. const options = response.data.map((item) => ({
  2052. label: item,
  2053. value: item
  2054. }));
  2055. dropdownOptions.value = options;
  2056. // Default to selecting the first option
  2057. const defaultOption = options.find(option => option.value === JTMC);
  2058. if (defaultOption) {
  2059. selectedOption.value = defaultOption.value;
  2060. } else if (options.length > 0) {
  2061. // 如果 myDefaultValue 不在选项中,选择第一个选项
  2062. selectedOption.value = options[0].value;
  2063. }
  2064. }
  2065. } catch (error) {
  2066. console.error('Error fetching data:', error);
  2067. // Handle the error appropriately
  2068. }
  2069. };
  2070. // formData
  2071. let BZMC=ref()
  2072. let lastCellValue=ref()
  2073. let parts =reactive([])
  2074. // 自动化生成的字典(可能为空)以及字段
  2075. const formData= ref({
  2076. 工单编号:'',
  2077. 印件编号:'',
  2078. 工序名称:'',
  2079. 产品名称:'',
  2080. sczl_bh1:'',
  2081. sczl_bh2:'',
  2082. sczl_bh3:'',
  2083. sczl_bh4:'',
  2084. sczl_bh5:'',
  2085. sczl_bh6:'',
  2086. sczl_bh7:'',
  2087. sczl_bh8:'',
  2088. sczl_bh9:'',
  2089. sczl_bh10:'',
  2090. sczl_name1:'',
  2091. sczl_name2:'',
  2092. sczl_name3:'',
  2093. sczl_name4:'',
  2094. sczl_name5:'',
  2095. sczl_name6:'',
  2096. sczl_name7:'',
  2097. sczl_name8:'',
  2098. sczl_name9:'',
  2099. sczl_name10:'',
  2100. })
  2101. const formDatasData= reactive([])
  2102. const formDatas = ref({
  2103. code1:'',
  2104. code2:'',
  2105. code3:'',
  2106. code4:'',
  2107. code5:'',
  2108. code6:'',
  2109. code7:'',
  2110. code8:'',
  2111. code9:'',
  2112. code10:'',
  2113. name1:'',
  2114. name2:'',
  2115. name3:'',
  2116. name4:'',
  2117. name5L:'',
  2118. name6:'',
  2119. name7:'',
  2120. name8:'',
  2121. name9:'',
  2122. name10:'',
  2123. percentage1:'',
  2124. percentage2:'',
  2125. percentage3:'',
  2126. percentage4:'',
  2127. percentage5:'',
  2128. percentage6:'',
  2129. percentage7:'',
  2130. percentage8:'',
  2131. percentage9:'',
  2132. percentage10:'',
  2133. })
  2134. //班组单击
  2135. const BZhandle = (val, row) => {
  2136. formDatas.value = {};
  2137. for (const key in val) {
  2138. if (val[key] === 0) {
  2139. break;
  2140. }
  2141. const parts = val[key].split(/[\s()]+/);
  2142. const code = parts[0];
  2143. const name = parts[1];
  2144. const percentage = parts[2];
  2145. // 根据索引填充不同的字段
  2146. const index = parseInt(key) + 1; // 索引从1开始
  2147. formDatas.value['code' + index] = code;
  2148. formDatas.value['name' + index] = name;
  2149. formDatas.value['percentage' + index] = percentage;
  2150. }
  2151. };
  2152. // ============== 表格控制部分结束 ===============
  2153. // 获取需要的字典 可能为空 按需保留
  2154. const setOptions = async () =>{
  2155. }
  2156. // 获取需要的字典 可能为空 按需保留
  2157. setOptions()
  2158. // 多选数据
  2159. const multipleSelection = ref([])
  2160. // 多选
  2161. const handleSelectionChange = (val) => {
  2162. multipleSelection.value = val
  2163. }
  2164. // 删除行
  2165. const deleteRow = (row) => {
  2166. ElMessageBox.confirm('确定要删除吗?', '提示', {
  2167. confirmButtonText: '确定',
  2168. cancelButtonText: '取消',
  2169. type: 'warning'
  2170. }).then(() => {
  2171. deleteCompanyFunc(row)
  2172. })
  2173. }
  2174. // 批量删除控制标记
  2175. const deleteVisible = ref(false)
  2176. // 多选删除
  2177. const onDelete = async() => {
  2178. const ids = []
  2179. if (multipleSelection.value.length === 0) {
  2180. ElMessage({
  2181. type: 'warning',
  2182. message: '请选择要删除的数据'
  2183. })
  2184. return
  2185. }
  2186. multipleSelection.value &&
  2187. multipleSelection.value.map(item => {
  2188. ids.push(item.ID)
  2189. })
  2190. const res = await deleteCompanyByIds({ ids })
  2191. if (res.code === 0) {
  2192. ElMessage({
  2193. type: 'success',
  2194. message: '删除成功'
  2195. })
  2196. if (tableData.value.length === ids.length && page.value > 1) {
  2197. page.value--
  2198. }
  2199. deleteVisible.value = false
  2200. getTableData()
  2201. }
  2202. }
  2203. // 行为控制标记(弹窗内部需要增还是改)
  2204. const type = ref('')
  2205. // 更新行
  2206. const updateCompanyFunc = async(row) => {
  2207. const res = await findCompany({ ID: row.ID })
  2208. type.value = 'update'
  2209. if (res.code === 0) {
  2210. formData.value = res.data.recompany
  2211. dialogFormVisible.value = true
  2212. }
  2213. }
  2214. const cpcode=ref('')
  2215. const yjupdateCompanyFunc = async(row) => {
  2216. const res = await facilityProcedure({ Gd_gdbh: row['工单编号|质量信息'].substring(0, 7) })
  2217. console.log(res)
  2218. if (res.code === 0) {
  2219. selectData.value = res.data
  2220. }
  2221. console.log(row)
  2222. cpcode.value=row.产品代号
  2223. console.log(cpcode)
  2224. }
  2225. // 删除行
  2226. const deleteCompanyFunc = async (row) => {
  2227. const res = await deleteCompany({ ID: row.ID })
  2228. if (res.code === 0) {
  2229. ElMessage({
  2230. type: 'success',
  2231. message: '删除成功'
  2232. })
  2233. if (tableData.value.length === 1 && page.value > 1) {
  2234. page.value--
  2235. }
  2236. getTableData()
  2237. }
  2238. }
  2239. // 弹窗控制标记
  2240. const dialogFormVisible = ref(false)
  2241. const dianjianVisible = ref(false)
  2242. const yinbanVisible = ref(false)
  2243. // 查看详情控制标记
  2244. const detailShow = ref(false)
  2245. const bzData = reactive([])
  2246. // 打开详情弹窗
  2247. const openDetailShow = () => {
  2248. detailShow.value = true
  2249. }
  2250. // 打开详情
  2251. const getDetails = async (row) => {
  2252. // 打开弹窗
  2253. const res = await findCompany({ ID: row.ID })
  2254. if (res.code === 0) {
  2255. formData.value = res.data.recompany
  2256. openDetailShow()
  2257. }
  2258. }
  2259. // 关闭详情弹窗
  2260. const closeDetailShow = () => {
  2261. detailShow.value = false
  2262. }
  2263. // 打开弹窗
  2264. const openDialog = () => {
  2265. // type.value = 'create'
  2266. console.log('222')
  2267. FacilityInspect()
  2268. FacilitychanLiang()
  2269. dialogFormVisible.value = true
  2270. }
  2271. let drzcData=[]
  2272. let columnNames=[]
  2273. //当日制程检验记录
  2274. const FacilityInspect = async () => {
  2275. const response = await facilityInspect({machine:JTMC,date:date});
  2276. console.log(response)
  2277. if(response.code==0){
  2278. // 提取 inspectiontime 作为列名
  2279. // Extract inspectiontime as columnNames
  2280. columnNames = response.data.InspectionTime;
  2281. // Populate drzcData with row data
  2282. for (const key in response.data.row[0]) {
  2283. if (key !== 'InspectionTime') {
  2284. const item = response.data.row[0][key];
  2285. const rowData = {
  2286. '工单编号': item['工单编号'],
  2287. '印件号': item['印件号'],
  2288. '工序名称': item['工序名称'],
  2289. '检验项目': item['检验项目']
  2290. };
  2291. // Initialize time columns with '—'
  2292. columnNames.forEach(time => {
  2293. rowData[time] = '';
  2294. });
  2295. // Split inspectresult and fill the corresponding time columns
  2296. const results = item['time'].split(',');
  2297. results.forEach(result => {
  2298. if (columnNames.includes(result)) {
  2299. rowData[result] = '√';
  2300. }else{rowData[result] = ''}
  2301. });
  2302. // Add the row data to drzcData
  2303. drzcData.push(rowData);
  2304. }
  2305. }
  2306. drzcDatas.value=drzcData
  2307. console.log(drzcData);
  2308. }
  2309. }
  2310. const FacilitychanLiang = async () => {
  2311. const response = await facilitychanLiang({machine:JTMC,date:date});
  2312. if(response.code==0){
  2313. delete response.data['totalA']
  2314. delete response.data['totalB']
  2315. gytableData.value=Object.values(response.data)
  2316. }
  2317. }
  2318. // 关闭弹窗
  2319. const closeDialog = () => {
  2320. dialogFormVisible.value = false
  2321. formData.value = {
  2322. address: '',
  2323. image: '',
  2324. name: '',
  2325. }
  2326. }
  2327. // 弹窗确定
  2328. const enterDialog = async () => {
  2329. elFormRef.value?.validate( async (valid) => {
  2330. if (!valid) return
  2331. let res
  2332. switch (type.value) {
  2333. case 'create':
  2334. res = await createCompany(formData.value)
  2335. break
  2336. case 'update':
  2337. res = await updateCompany(formData.value)
  2338. break
  2339. default:
  2340. res = await createCompany(formData.value)
  2341. break
  2342. }
  2343. if (res.code === 0) {
  2344. ElMessage({
  2345. type: 'success',
  2346. message: '创建/更改成功'
  2347. })
  2348. closeDialog()
  2349. getTableData()
  2350. }
  2351. })
  2352. }
  2353. </script>
  2354. <style>
  2355. .JKWTree-container {
  2356. display: flex;
  2357. }
  2358. .JKWTree-tree {
  2359. width: 300px;
  2360. background-color: #fff;
  2361. padding: 10px;
  2362. margin-right: 20px;
  2363. }
  2364. .JKWTree-tree h3 {
  2365. font-size: 15px;
  2366. font-weight: 700;
  2367. margin: 10px 0;
  2368. }
  2369. .JKWTree-content {
  2370. flex: 1;
  2371. }
  2372. /* 选中某行时的背景色*/
  2373. .el-table__body tr.current-row>td {
  2374. background: #ff80ff !important;
  2375. }
  2376. .groupbox
  2377. {margin:10px;
  2378. width:500px;
  2379. height:500px;
  2380. border:thin solid black;
  2381. padding:10px}
  2382. .grouptitle
  2383. {display:block;
  2384. margin-top:-24px;
  2385. margin-left:20px;
  2386. width:150px;
  2387. text-align:center;
  2388. background-color:white}
  2389. </style>