chejianbaogong.vue 76 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191
  1. <template>
  2. <div>
  3. <header>
  4. <el-button type="primary" @click="onBZ">班组维护</el-button>
  5. <el-button type="primary" @click="onDel">删除</el-button>
  6. <el-button type="primary" @click="onOver">完工</el-button>
  7. <el-button type="primary" @click="ondianjian">设备点检</el-button>
  8. <el-button type="primary" @click="onchanliang">日产量上报</el-button>
  9. </header>
  10. <el-container>
  11. <el-aside width="200px">
  12. <div class="JKWTree-tree">
  13. <h3 > 车间报工</h3>
  14. <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
  15. </div>
  16. </el-aside>
  17. <el-container>
  18. <!-- <el-header>dd</el-header>-->
  19. <el-main>
  20. <div class="gva-search-box" style="overflow: hidden; padding: 0; display: flex;">
  21. <div style="flex: 1; border: 1px magenta solid; margin: 0; padding: 0;">
  22. <el-row :gutter="20">
  23. <el-col :span="6">
  24. <el-form-item label="工单编号" prop="name">
  25. <el-row :gutter="20">
  26. <el-col :span="12">
  27. <el-input v-model="formData.工单编号" :clearable="true" placeholder="ZT01733" />
  28. </el-col>
  29. <el-col :span="12">
  30. <el-input v-model="formData.产品名称" :clearable="true" placeholder="ZT01733" />
  31. </el-col>
  32. </el-row>
  33. </el-form-item>
  34. </el-col>
  35. </el-row>
  36. <el-row :gutter="20">
  37. <el-col :span="4">
  38. <el-form-item label="印件编号" prop="id">
  39. <el-input v-model="formData.印件编号" :clearable="true" placeholder="2023.12.14" />
  40. </el-form-item>
  41. </el-col>
  42. <el-col :span="6">
  43. <el-form-item label="工序名称" prop="name">
  44. <el-input v-model="formData.工序名称" :clearable="true" placeholder="A班" />
  45. </el-form-item>
  46. </el-col>
  47. </el-row>
  48. <el-row :gutter="20">
  49. <el-col :span="4">
  50. <el-form-item label="班组成员" prop="id">
  51. </el-form-item>
  52. </el-col>
  53. </el-row>
  54. <el-row :gutter="1">
  55. <el-col :span="3">
  56. <el-input v-model="formData.sczl_bh1" :clearable="true" placeholder="ZT01733" />
  57. </el-col>
  58. <el-col :span="3">
  59. <el-input v-model="formData.sczl_bh2" :clearable="true" placeholder="ZT01733" />
  60. </el-col>
  61. <el-col :span="3">
  62. <el-input v-model="formData.sczl_bh3" :clearable="true" placeholder="ZT01733" />
  63. </el-col>
  64. <el-col :span="3">
  65. <el-input v-model="formData.sczl_bh4" :clearable="true" placeholder="ZT01733" />
  66. </el-col>
  67. <el-col :span="3">
  68. <el-input v-model="formData.sczl_bh5" :clearable="true" placeholder="ZT01733" />
  69. </el-col>
  70. <el-col :span="3">
  71. <el-input v-model="formData.sczl_bh6" :clearable="true" placeholder="ZT01733" />
  72. </el-col>
  73. <!-- <el-col :span="1">
  74. <el-input v-model="formData.sczl_bh7" :clearable="true" placeholder="ZT01733" />
  75. </el-col>
  76. <el-col :span="1">
  77. <el-input v-model="formData.sczl_bh8" :clearable="true" placeholder="ZT01733" />
  78. </el-col>
  79. <el-col :span="1">
  80. <el-input v-model="formData.sczl_bh9" :clearable="true" placeholder="ZT01733" />
  81. </el-col>
  82. <el-col :span="1">
  83. <el-input v-model="formData.sczl_bh10" :clearable="true" placeholder="2023.12.14" />
  84. </el-col> -->
  85. </el-row>
  86. <el-row :gutter="1">
  87. <el-col :span="3">
  88. <el-input v-model="formData.sczl_name1" :clearable="true" placeholder="ZT01733" />
  89. </el-col>
  90. <el-col :span="3">
  91. <el-input v-model="formData.sczl_name2" :clearable="true" placeholder="ZT01733" />
  92. </el-col>
  93. <el-col :span="3">
  94. <el-input v-model="formData.sczl_name3" :clearable="true" placeholder="ZT01733" />
  95. </el-col>
  96. <!-- <el-col :span="3">
  97. <el-input v-model="formData.name4" :clearable="true" placeholder="ZT01733" />
  98. </el-col>
  99. <!-- <el-col :span="1">
  100. <el-input v-model="formData.name5" :clearable="true" placeholder="ZT01733" />
  101. </el-col>
  102. <el-col :span="1">
  103. <el-input v-model="formData.name6" :clearable="true" placeholder="ZT01733" />
  104. </el-col>
  105. <el-col :span="1">
  106. <el-input v-model="formData.name7" :clearable="true" placeholder="ZT01733" />
  107. </el-col>
  108. <el-col :span="1">
  109. <el-input v-model="formData.name8" :clearable="true" placeholder="ZT01733" />
  110. </el-col>
  111. <el-col :span="1">
  112. <el-input v-model="formData.name9" :clearable="true" placeholder="ZT01733" />
  113. </el-col>
  114. <el-col :span="1">
  115. <el-input v-model="formData.name10" :clearable="true" placeholder="2023.12.14" />
  116. </el-col> -->
  117. </el-row>
  118. </div>
  119. <div style="flex: 1; border: 1px lawngreen solid; margin: 0; padding: 0; overflow: hidden;">
  120. <el-table
  121. tooltip-effect="dark"
  122. :data="selectData"
  123. row-key="ID"
  124. highlight-current-row="true"
  125. border
  126. style="width:100%"
  127. @row-dblclick="handleSelectClick"
  128. >
  129. <el-table-column
  130. prop="Gd_cpmc"
  131. label="印件及工序"
  132. width="340"
  133. />
  134. <el-table-column
  135. prop="jyGx"
  136. label="已完成板数"
  137. width="150"
  138. />
  139. </el-table>
  140. </div>
  141. </div>
  142. <div class="gva-table-box">
  143. <div class="gva-btn-list">
  144. <el-button type="primary" icon="plus" @click="openDialog">新增</el-button>
  145. <el-popover v-model:visible="deleteVisible" :disabled="!multipleSelection.length" placement="top" width="160">
  146. <p>确定要删除吗?</p>
  147. <div style="text-align: right; margin-top: 8px;">
  148. <el-button type="primary" link @click="deleteVisible = false">取消</el-button>
  149. <el-button type="primary" @click="onDelete">确定</el-button>
  150. </div>
  151. <template #reference>
  152. <el-button icon="delete" style="margin-left: 10px;" :disabled="!multipleSelection.length" @click="deleteVisible = true">删除</el-button>
  153. </template>
  154. </el-popover>
  155. </div>
  156. <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  157. <el-tab-pane label="设备作业清单" @click="showTable('印件资料')" name="first">
  158. <el-table ref="multipleTable"
  159. :show-overflow-tooltip="true"
  160. highlight-current-row="true"
  161. :row-style="{ height: '20px' }"
  162. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  163. :header-cell-style="{ padding: '0px' }"
  164. @row-dblclick="yjupdateCompanyFunc"
  165. style="width: 100%;height: 330px" border tooltip-effect="dark" :data="sbzyData" row-key="ID" @selection-change="handleSelectionChange">
  166. <!-- <el-table-column type="selection" width="55" />-->
  167. <el-table-column align="left" label="选择" prop="yj_yjno" width="80"/>
  168. <el-table-column align="left" label="工单编号|质量信息" prop="工单编号|质量信息" width="180" />
  169. <el-table-column align="left" label="印件资料" prop="印件资料" width="240" />
  170. <el-table-column align="left" label="工序名称" prop="工序名称" width="100" />
  171. <el-table-column align="left" label="计划产量/已完成" prop="计划产量/已完成" width="180"/>
  172. <el-table-column align="left" label="装版时数" prop="装版时数" width="100"/>
  173. <el-table-column align="left" label="工序产能" prop="工序产能" width="100"/>
  174. <el-table-column align="left" label="计划工时" prop="计划工时" width="100"/>
  175. <el-table-column align="left" label="计划生产时段" prop="计划生产时段" width="240" />
  176. <el-table-column align="left" label="排产备注" prop="排产备注" width="100" />
  177. <el-table-column align="left" label="产品名称" prop="产品名称" width="240" />
  178. </el-table>
  179. </el-tab-pane>
  180. <el-tab-pane label="班组人员及分配比例" @click="showTable('工艺资料')" name="second">
  181. <el-table ref="multipleTable"
  182. highlight-current-row="true"
  183. :show-overflow-tooltip="true"
  184. :row-style="{ height: '20px' }"
  185. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  186. :header-cell-style="{ padding: '0px' }"
  187. @row-dblclick="gyupdateCompanyFunc"
  188. :row-class-name="rowClassStyle"
  189. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="FPData" row-key="ID" @selection-change="handleSelectionChange"
  190. @row-click="clickybupdate">
  191. <el-table-column type="selection" label="选择" width="55" />
  192. <el-table-column align="left" label="班组号" prop="班组号" width="80" />
  193. <el-table-column align="left" label="组员1" prop="0" width="240" />
  194. <el-table-column align="left" label="组员2" prop="1" width="240" />
  195. <el-table-column align="left" label="组员3" prop="2" width="240" />
  196. <el-table-column align="left" label="组员4" prop="3" width="240" />
  197. <el-table-column align="left" label="组员5" prop="4" width="100" />
  198. <el-table-column align="left" label="组员6" prop="5" width="100" />
  199. <el-table-column align="left" label="组员7" prop="6" width="100" />
  200. <el-table-column align="left" label="组员8" prop="7" width="100" />
  201. <el-table-column align="left" label="组员9" prop="8" width="100" />
  202. <el-table-column align="left" label="组员10" prop="9_正品版" width="120" />
  203. </el-table>
  204. </el-tab-pane>
  205. <el-tab-pane label="当班产量明细" @click="showTable('印版资料')" name="third">
  206. <el-table ref="multipleTable"
  207. highlight-current-row="true"
  208. :show-overflow-tooltip="true"
  209. :row-style="{ height: '20px' }"
  210. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  211. :header-cell-style="{ padding: '0px' }"
  212. @row-dblclick="ybupdateCompanyFunc"
  213. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="CLMXData" row-key="ID" @selection-change="handleSelectionChange"
  214. >
  215. <!-- <el-table-column type="selection" width="55" />-->
  216. <el-table-column align="left" label="生产时段" prop="生产时间段" width="180"/>
  217. <el-table-column align="left" label="工单编号" prop="工单编号" width="120" />
  218. <el-table-column align="left" label="产品名称" prop="产品名称" width="240" />
  219. <el-table-column align="left" label="印件及工序" prop="印件及工序" width="320"/>
  220. <el-table-column align="left" label="标牌号" prop="标牌号" width="80"/>
  221. <el-table-column align="left" label="产量" prop="产量" width="100"/>
  222. <el-table-column align="left" label="制程废品" prop="制程废品" width="100" />
  223. <el-table-column align="left" label="制程次品" prop="制程次品" width="100" />
  224. <el-table-column align="left" label="前工序废" prop="前工序废" width="100" />
  225. <el-table-column align="left" label="来料异常" prop="来料异常" width="100"/>
  226. <el-table-column align="left" label="装版工时" prop="装版工时" width="100" />
  227. <el-table-column align="left" label="保养工时" prop="保养工时" width="100" />
  228. <el-table-column align="left" label="打样工时" prop="打样工时" width="100"/>
  229. <el-table-column align="left" label="异常停机工时" prop="异常停机工时" width="120"/>
  230. <el-table-column align="left" label="通电工时" prop="通电工时" width="100"/>
  231. <el-table-column align="left" label="码开始行" prop="码开始行" width="100" />
  232. <el-table-column align="left" label="码结束行" prop="码结束行" width="100" />
  233. <el-table-column align="left" label="码包" prop="码包" width="100" />
  234. <el-table-column align="left" label="主电表" prop="主电表" width="100"/>
  235. <el-table-column align="left" label="辅电表" prop="辅电表" width="100" />
  236. <el-table-column align="left" label="色度数" prop="色度数" width="100" />
  237. </el-table>
  238. </el-tab-pane>
  239. <el-tab-pane label="检验记录" @click="showTable('技术资料附件')" name="fourth">
  240. <el-table ref="multipleTable"
  241. :row-style="{ height: '20px' }"
  242. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  243. :header-cell-style="{ padding: '0px' }"
  244. :show-overflow-tooltip="true"
  245. highlight-current-row="true"
  246. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="JYData" row-key="ID" @selection-change="handleSelectionChange">
  247. <!-- <el-table-column type="selection" width="55" />-->
  248. <el-table-column align="left" label="工单编号" prop="工单编号" width="120"/>
  249. <el-table-column align="left" label="印件号" prop="印件号" width="120" />
  250. <el-table-column align="left" label="工序名称" prop="工序名称" width="330" />
  251. <el-table-column align="left" label="检验项目" prop="检验项目" width="120"/>
  252. <el-table-column
  253. v-for="time in columnNames"
  254. :key="time"
  255. :label="time"
  256. :prop="time"
  257. align="center"
  258. width="120"
  259. ></el-table-column>
  260. </el-table>
  261. </el-tab-pane>
  262. </el-tabs>
  263. <!-- <div class="gva-pagination">
  264. <el-pagination
  265. layout="total, sizes, prev, pager, next, jumper"
  266. :current-page="page"
  267. :page-size="pageSize"
  268. :page-sizes="[10, 30, 50, 100]"
  269. :total="total"
  270. @current-change="handleCurrentChange"
  271. @size-change="handleSizeChange"
  272. />
  273. </div> -->
  274. </div>
  275. <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type==='create'?'添加':'修改'" destroy-on-close>
  276. <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
  277. <el-tab-pane label="当日上报产量" @click="showTable('工艺资料')" name="first">
  278. <el-table ref="multipleTable"
  279. :show-overflow-tooltip="true"
  280. :row-style="{ height: '20px' }"
  281. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  282. :header-cell-style="{ padding: '0px' }"
  283. highlight-current-row="true"
  284. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
  285. <el-table-column type="selection" width="55" />
  286. <el-table-column align="left" label="选择" prop="工单编号" width="100"/>
  287. <el-table-column align="left" label="产品名称" prop="重点工序" width="100"/>
  288. <el-table-column align="left" label="工序" prop="工序备注" width="240"/>
  289. <el-table-column align="left" label="备注" prop="机组" width="100"/>
  290. <el-table-column align="left" label="产量" prop="小时产能" width="100"/>
  291. <el-table-column align="left" label="千件工价" prop="生产工时" width="100"/>
  292. <el-table-column align="left" label="日定额" prop="辅助工时" width="100"/>
  293. <el-table-column align="left" label="补产标准" prop="印刷方式" width="100"/>
  294. <el-table-column align="left" label="难度系数" prop="版距" width="100"/>
  295. <el-table-column align="left" label="印刷方式" prop="创建用户" width="120"/>
  296. <el-table-column align="left" label="组员1" prop="Gy0_gxh" width="240" />
  297. <el-table-column align="left" label="组员2" prop="gy0_gxmc" width="240" />
  298. <el-table-column align="left" label="组员3" prop="add_gxmc" width="240" />
  299. <el-table-column align="left" label="组员4" prop="Gy0_Ks" width="240" />
  300. <el-table-column align="left" label="组员5" prop="Gy0_ls" width="100" />
  301. <el-table-column align="left" label="组员6" prop="备注" width="100" />
  302. <el-table-column align="left" label="组员7" prop="工价系数" width="100" />
  303. <el-table-column align="left" label="组员8" prop="损耗系数" width="100" />
  304. <el-table-column align="left" label="组员9" prop="Gy0_Ms" width="100" />
  305. <el-table-column align="left" label="组员10" prop="人工检_正品版" width="120" />
  306. <el-table-column align="left" label="制程废品" prop="Sys_id" width="100" />
  307. <el-table-column align="left" label="制程次品" prop="建档日期" width="100" />
  308. <el-table-column align="left" label="前工序废" prop="更新日期" width="100" />
  309. <el-table-column align="left" label="来料异常" prop="YB_方案" width="100"/>
  310. <el-table-column align="left" label="装版工时" prop="YB_Yjno" width="100" />
  311. <el-table-column align="left" label="保养工时" prop="印版类别" width="100" />
  312. <el-table-column align="left" label="打样工时" prop="存货编码" width="100"/>
  313. <el-table-column align="left" label="异常停机工时" prop="印版名称" width="120"/>
  314. <el-table-column align="left" label="通电工时" prop="考核印数" width="100"/>
  315. <el-table-column align="left" label="码开始行" prop="Sys_id" width="100" />
  316. <el-table-column align="left" label="码结束行" prop="建档日期" width="100" />
  317. <el-table-column align="left" label="码包" prop="更新日期" width="100" />
  318. <el-table-column align="left" label="主电表" prop="YB_方案" width="100"/>
  319. <el-table-column align="left" label="辅电表" prop="YB_Yjno" width="100" />
  320. <el-table-column align="left" label="色度数" prop="印版类别" width="100" />
  321. <el-table-column align="left" label="用户" prop="YB_Yjno" width="100" />
  322. <el-table-column align="left" label="更新时间" prop="印版类别" width="100" />
  323. </el-table>
  324. </el-tab-pane>
  325. <el-tab-pane label="当日制程检验记录" @click="showTable('印件资料')" name="second">
  326. <el-table ref="multipleTable"
  327. :row-style="{ height: '20px' }"
  328. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  329. :header-cell-style="{ padding: '0px' }"
  330. :show-overflow-tooltip="true"
  331. highlight-current-row="true"
  332. style="width: 100%;height: 400px" border tooltip-effect="dark" :data="drzcData" row-key="ID" @selection-change="handleSelectionChange">
  333. <el-table-column type="selection" width="55" />
  334. <el-table-column align="left" label="工单编号" prop="工单编号" width="120"/>
  335. <el-table-column align="left" label="印件号" prop="印件号" width="120" />
  336. <el-table-column align="left" label="工序名称" prop="工序名称" width="330" />
  337. <el-table-column align="left" label="检验项目" prop="检验项目" width="120"/>
  338. <el-table-column
  339. v-for="time in columnNames"
  340. :key="time"
  341. :label="time"
  342. :prop="time"
  343. align="center"
  344. width="120"
  345. ></el-table-column>
  346. </el-table>
  347. </el-tab-pane>
  348. </el-tabs>
  349. </el-dialog>
  350. <el-dialog v-model="detailShow" style="width: 800px" lock-scroll :before-close="closeDetailShow" title="机台班组维护" destroy-on-close>
  351. <el-table ref="multipleTable"
  352. :row-style="{ height: '20px' }"
  353. :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
  354. :header-cell-style="{ padding: '0px' }"
  355. :show-overflow-tooltip="true"
  356. highlight-current-row="true" @row-click="BZhandle"
  357. style="width: 100%;height: 250px" border tooltip-effect="dark"
  358. :data="bzData" row-key="ID" @selection-change="BZSelectionChange">
  359. <el-table-column type="selection" width="55" />
  360. <el-table-column align="left" label="机台" prop="JTMC" width="120"/>
  361. <el-table-column align="left" label="班组" prop="班组号" width="120"/>
  362. <el-table-column align="left" label="组员1" prop="0" width="120"/>
  363. <el-table-column align="left" label="组员2" prop="1" width="120"/>
  364. <el-table-column align="left" label="组员3" prop="2" width="120"/>
  365. <el-table-column align="left" label="组员4" prop="3" width="160"/>
  366. <el-table-column align="left" label="组员5" prop="4" width="160"/>
  367. <el-table-column align="left" label="组员6" prop="5" width="120"/>
  368. <el-table-column align="left" label="组员7" prop="6" width="120"/>
  369. <el-table-column align="left" label="组员8" prop="7" width="120"/>
  370. <el-table-column align="left" label="组员9" prop="8" width="120"/>
  371. <el-table-column align="left" label="特殊组员" prop="9" width="120"/>
  372. <el-table-column align="left" label="UNIQID" prop="ID" width="120"/>
  373. </el-table>
  374. <el-row :gutter="20">
  375. <el-col :span="10">
  376. <el-form-item label="机台编号" prop="id">
  377. <el-select v-model="selectedOption" placeholder="请选择">
  378. <el-option
  379. v-for="item in dropdownOptions"
  380. :key="item.value"
  381. :label="item.label"
  382. :value="item.value"
  383. ></el-option>
  384. </el-select>
  385. </el-form-item>
  386. </el-col>
  387. <el-col :span="10">
  388. <el-form-item label="班组编号" prop="id">
  389. <el-input v-model="BZMC" :clearable="true" placeholder="2023.12.14" />
  390. </el-form-item>
  391. </el-col>
  392. </el-row>
  393. <div class="groupbox">
  394. <span class="grouptitle">组员及分配比例</span>
  395. <el-row :gutter="10" style="margin-top: 10px;">
  396. <el-col :span="2">
  397. <span></span>
  398. </el-col>
  399. <el-col :span="2">
  400. </el-col>
  401. <el-col :span="2">
  402. </el-col>
  403. <el-col :span="2">
  404. </el-col>
  405. <el-col :span="2">
  406. </el-col>
  407. <el-col :span="2">
  408. </el-col>
  409. <el-col :span="2">
  410. </el-col>
  411. <el-col :span="2">
  412. </el-col>
  413. <el-col :span="2">
  414. </el-col>
  415. <el-col :span="2">
  416. </el-col>
  417. <el-col :span="2">
  418. <el-form-item label="特殊组员" prop="id">
  419. </el-form-item>
  420. </el-col>
  421. </el-row>
  422. <el-row :gutter="10" style="margin-top: 10px;">
  423. <el-col :span="2">
  424. <span></span>
  425. </el-col>
  426. <el-col :span="4">
  427. <el-input v-model="formDatas.code1" :clearable="true" placeholder="11.0" />
  428. </el-col>
  429. <el-col :span="4">
  430. <el-input v-model="formDatas.code2" :clearable="true" placeholder="打包废纸" />
  431. </el-col>
  432. <el-col :span="4">
  433. <el-input v-model="formDatas.code3" :clearable="true" placeholder="是" />
  434. </el-col>
  435. <el-col :span="4">
  436. <el-input v-model="formDatas.code4" :clearable="true" placeholder="是" />
  437. </el-col>
  438. <!-- <el-col :span="2">
  439. <el-input v-model="formData.name" :clearable="true" placeholder="瞿春生" />
  440. </el-col>
  441. <el-col :span="2">
  442. <el-input v-model="percentage" :clearable="true" placeholder="11.0" />
  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="是" />
  449. </el-col>
  450. <el-col :span="2">
  451. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="ZI00401" />
  452. </el-col>
  453. <el-col :span="2">
  454. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="瞿春生" />
  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-col :span="2">
  463. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  464. </el-col> -->
  465. </el-row>
  466. <el-row :gutter="10" style="margin-top: 10px;">
  467. <el-col :span="2">
  468. <span></span>
  469. </el-col>
  470. <el-col :span="4">
  471. <el-input v-model="formDatas.name1" :clearable="true" placeholder="ZI00401" />
  472. </el-col>
  473. <el-col :span="4">
  474. <el-input v-model="formDatas.name2" :clearable="true" placeholder="瞿春生" />
  475. </el-col>
  476. <el-col :span="4">
  477. <el-input v-model="formDatas.name3" :clearable="true" placeholder="11.0" />
  478. </el-col>
  479. <el-col :span="4">
  480. <el-input v-model="formDatas.name4" :clearable="true" placeholder="打包废纸" />
  481. </el-col>
  482. <!-- <el-col :span="2">
  483. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="是" />
  484. </el-col>
  485. <el-col :span="2">
  486. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="ZI00401" />
  487. </el-col>
  488. <el-col :span="2">
  489. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="瞿春生" />
  490. </el-col>
  491. <el-col :span="2">
  492. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  493. </el-col>
  494. <el-col :span="2">
  495. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  496. </el-col>
  497. <el-col :span="2">
  498. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  499. </el-col> -->
  500. </el-row>
  501. <el-row :gutter="10" style="margin-top: 10px;">
  502. <el-col :span="2">
  503. <span></span>
  504. </el-col>
  505. <el-col :span="4">
  506. <el-input v-model="formDatas.percentage1" :clearable="true" placeholder="ZI00401" />
  507. </el-col>
  508. <el-col :span="4">
  509. <el-input v-model="formDatas.percentage2" :clearable="true" placeholder="瞿春生" />
  510. </el-col>
  511. <el-col :span="4">
  512. <el-input v-model="formDatas.percentage3" :clearable="true" placeholder="11.0" />
  513. </el-col>
  514. <el-col :span="4">
  515. <el-input v-model="formDatas.percentage4" :clearable="true" placeholder="打包废纸" />
  516. </el-col>
  517. <!-- <el-col :span="2">
  518. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="是" />
  519. </el-col>
  520. <el-col :span="2">
  521. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="ZI00401" />
  522. </el-col>
  523. <el-col :span="2">
  524. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="瞿春生" />
  525. </el-col>
  526. <el-col :span="2">
  527. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  528. </el-col>
  529. <el-col :span="2">
  530. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  531. </el-col>
  532. <el-col :span="2">
  533. <el-input v-model="formData.qczl_NumDesc" :clearable="true" placeholder="11.0" />
  534. </el-col> -->
  535. </el-row>
  536. </div>
  537. </el-dialog>
  538. <el-dialog
  539. v-model="dianjianVisible"
  540. title="选择"
  541. destroy-on-close
  542. width="1300px"
  543. style="height: 110%;"
  544. >
  545. <el-row :gutter="0">
  546. <el-col :span="4">
  547. <el-form-item label="设备编号" prop="id">
  548. <el-input v-model="formData.sczl_gdbh" :clearable="true" placeholder="2023.12.14" />
  549. </el-form-item>
  550. </el-col>
  551. <el-col :span="20">
  552. <el-row :gutter="20">
  553. <el-col :span="5">
  554. <el-input v-model="formData.sczl_bzdh" :clearable="true" placeholder="ZT01733" />
  555. </el-col>
  556. </el-row>
  557. </el-col>
  558. </el-row>
  559. <div style="display: flex;">
  560. <div style="flex: 1;">
  561. <el-aside width="250px" style="margin: 0;">
  562. <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
  563. <el-tree :data="dianjiantreeData" :props="defaultProps" highlight-current="true"
  564. @node-click="dianjianNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
  565. </div>
  566. </el-aside>
  567. </div>
  568. <div style="flex: 1; margin: 0;">
  569. <el-table
  570. tooltip-effect="dark"
  571. :data="dianjianselectData"
  572. row-key="ID"
  573. highlight-current-row="true"
  574. border @row-click="dianjianhandle"
  575. style="width:100%; height:400px;"
  576. @row-dblclick="handleSelectClick"
  577. :row-class-name="rowClassName"
  578. >
  579. <el-table-column
  580. prop="检验项目"
  581. label="检验项目"
  582. width="180"
  583. />
  584. <el-table-column
  585. prop="点检方法"
  586. label="点检方法"
  587. width="180"
  588. />
  589. <el-table-column
  590. label="正常"
  591. width="80"
  592. >
  593. <el-checkbox v-model="checked1" :indeterminate="isIndeterminate" @change="handleCheckAllChange" ></el-checkbox>
  594. </el-table-column>
  595. <el-table-column
  596. label="异常"
  597. width="80"
  598. >
  599. <el-checkbox v-model="checked2" :indeterminate="isIndeterminate" @change="handleCheckAllChange"></el-checkbox>
  600. </el-table-column>
  601. <el-table-column
  602. label="备注说明"
  603. width="180"
  604. />
  605. <el-table-column
  606. label="不检测"
  607. width="80"
  608. >
  609. <el-checkbox v-model="checked3" :indeterminate="isIndeterminate" @change="handleCheckAllChange" ></el-checkbox>
  610. </el-table-column>
  611. </el-table>
  612. <el-row :gutter="20">
  613. <el-col :span="20">
  614. <el-input v-model="pandingfangfa" style="height: 50px;" :clearable="true" />
  615. </el-col>
  616. </el-row>
  617. </div>
  618. </div>
  619. </el-dialog>
  620. <el-dialog
  621. v-model="chanliangVisible"
  622. title="选择"
  623. destroy-on-close
  624. width="1400px"
  625. style="height: 170%;"
  626. >
  627. <el-row :gutter="20">
  628. <el-col :span="4">
  629. <el-form-item label="工单编号" prop="id">
  630. <el-input v-model="formData3.order" :clearable="true" placeholder="2023.12.14" />
  631. </el-form-item>
  632. </el-col>
  633. <el-col :span="6">
  634. <el-form-item label="产品名称" prop="name">
  635. <el-row :gutter="20">
  636. <el-col :span="40">
  637. <el-input v-model="formData3.product_name" :clearable="true" placeholder="ZT01733" />
  638. </el-col>
  639. </el-row>
  640. </el-form-item>
  641. </el-col>
  642. <el-col :span="6">
  643. <el-form-item label="工序名称" prop="name">
  644. <el-row :gutter="20">
  645. <el-col :span="12">
  646. <el-input v-model="formData3.gxmc" :clearable="true" placeholder="ZT01733" />
  647. </el-col>
  648. </el-row>
  649. </el-form-item>
  650. </el-col>
  651. </el-row>
  652. <el-row :gutter="20">
  653. <el-col :span="4">
  654. <el-form-item label="印件号" prop="id">
  655. <el-input v-model="formData3.yjno" :clearable="true" placeholder="2023.12.14" />
  656. </el-form-item>
  657. </el-col>
  658. <el-col :span="6">
  659. <el-form-item label="印件名称" prop="name">
  660. <el-row :gutter="20">
  661. <el-col :span="40">
  662. <el-input v-model="formData3.yj_name" :clearable="true" placeholder="ZT01733" />
  663. </el-col>
  664. </el-row>
  665. </el-form-item>
  666. </el-col>
  667. <el-col :span="6">
  668. <el-form-item label="工艺名称" prop="name">
  669. <el-row :gutter="20">
  670. <el-col :span="12">
  671. <el-input v-model="formData3.gy_name" :clearable="true" placeholder="ZT01733" />
  672. </el-col>
  673. <el-col :span="12">
  674. <el-input v-model="formData3.gxh" :clearable="true" placeholder="ZT01733" />
  675. </el-col>
  676. </el-row>
  677. </el-form-item>
  678. </el-col>
  679. </el-row>
  680. <el-row :gutter="20">
  681. <el-col :span="4">
  682. <el-form-item label="日期" prop="id">
  683. <el-input v-model="formData3.日期" :clearable="true" placeholder="2023.12.14" />
  684. </el-form-item>
  685. </el-col>
  686. <el-col :span="6">
  687. <el-form-item label="流程标牌" prop="name">
  688. <el-row :gutter="20">
  689. <el-col :span="40">
  690. <el-input v-model="formData3.流程标牌" :clearable="true" placeholder="ZT01733" />
  691. </el-col>
  692. </el-row>
  693. </el-form-item>
  694. </el-col>
  695. <el-col :span="6">
  696. <el-form-item label="上机时间" prop="name">
  697. <el-row :gutter="20">
  698. <el-col :span="12">
  699. <el-input v-model="formData3.上机时间" :clearable="true" placeholder="ZT01733" />
  700. </el-col>
  701. </el-row>
  702. </el-form-item>
  703. </el-col>
  704. <el-col :span="6">
  705. <el-form-item label="下机时间" prop="name">
  706. <el-row :gutter="20">
  707. <el-col :span="12">
  708. <el-input v-model="formData3.下机时间" :clearable="true" placeholder="ZT01733" />
  709. </el-col>
  710. </el-row>
  711. </el-form-item>
  712. </el-col>
  713. </el-row>
  714. <el-row :gutter="20">
  715. <el-col :span="3">
  716. <el-form-item label="产量" prop="id">
  717. <el-input v-model="formData3.产量" :clearable="true" placeholder="2023.12.14" />
  718. </el-form-item>
  719. </el-col>
  720. <el-col :span="3">
  721. <el-form-item label="制程废品" prop="name">
  722. <el-row :gutter="20">
  723. <el-col :span="6">
  724. <el-input v-model="formData3.制程废品" :clearable="true" placeholder="ZT01733" />
  725. </el-col>
  726. </el-row>
  727. </el-form-item>
  728. </el-col>
  729. <el-col :span="3">
  730. <el-form-item label="制程次品" prop="name">
  731. <el-row :gutter="20">
  732. <el-col :span="6">
  733. <el-input v-model="formData3.制程次品" :clearable="true" placeholder="ZT01733" />
  734. </el-col>
  735. </el-row>
  736. </el-form-item>
  737. </el-col>
  738. <el-col :span="3">
  739. <el-form-item label="前工序废" prop="name">
  740. <el-row :gutter="20">
  741. <el-col :span="6">
  742. <el-input v-model="formData3.前工序废" :clearable="true" placeholder="ZT01733" />
  743. </el-col>
  744. </el-row>
  745. </el-form-item>
  746. </el-col>
  747. <el-col :span="3">
  748. <el-form-item label="来料异常" prop="name">
  749. <el-row :gutter="20">
  750. <el-col :span="6">
  751. <el-input v-model="formData3.来料异常" :clearable="true" placeholder="ZT01733" />
  752. </el-col>
  753. </el-row>
  754. </el-form-item>
  755. </el-col>
  756. <el-col :span="3">
  757. <el-form-item label="联数" prop="name">
  758. <el-row :gutter="20">
  759. <el-col :span="4">
  760. <el-input v-model="formData3.联数" :clearable="true" placeholder="ZT01733" />
  761. </el-col>
  762. </el-row>
  763. </el-form-item>
  764. </el-col>
  765. <el-col :span="4">
  766. <el-form-item label="墨色" prop="name">
  767. <el-row :gutter="20">
  768. <el-col :span="4">
  769. <el-input v-model="formData3.墨色" :clearable="true" placeholder="ZT01733" />
  770. </el-col>
  771. </el-row>
  772. </el-form-item>
  773. </el-col>
  774. </el-row>
  775. <el-row :gutter="20">
  776. <el-col :span="4">
  777. <el-form-item label="装版总工时" prop="id">
  778. <el-input v-model="formData3.装版总工时" :clearable="true" placeholder="2023.12.14" />
  779. </el-form-item>
  780. </el-col>
  781. <el-col :span="6">
  782. <el-form-item label="打样总工时" prop="name">
  783. <el-row :gutter="20">
  784. <el-col :span="40">
  785. <el-input v-model="formData3.打样总工时" :clearable="true" placeholder="ZT01733" />
  786. </el-col>
  787. </el-row>
  788. </el-form-item>
  789. </el-col>
  790. <el-col :span="6">
  791. <el-form-item label="通电时间" prop="name">
  792. <el-row :gutter="20">
  793. <el-col :span="12">
  794. <el-input v-model="formData3.通电时间" :clearable="true" placeholder="ZT01733" />
  795. </el-col>
  796. </el-row>
  797. </el-form-item>
  798. </el-col>
  799. </el-row>
  800. <el-row :gutter="20">
  801. <el-col :span="4">
  802. <el-form-item label="定额代号" prop="id">
  803. <el-input v-model="formData3.定额代号" :clearable="true" placeholder="2023.12.14" />
  804. </el-form-item>
  805. </el-col>
  806. <el-col :span="6">
  807. <el-form-item label="码包" prop="name">
  808. <el-row :gutter="20">
  809. <el-col :span="40">
  810. <el-input v-model="formData3.码包" :clearable="true" placeholder="ZT01733" />
  811. </el-col>
  812. </el-row>
  813. </el-form-item>
  814. </el-col>
  815. <el-col :span="6">
  816. <el-form-item label="主电表" prop="name">
  817. <el-row :gutter="20">
  818. <el-col :span="12">
  819. <el-input v-model="formData3.主电表" :clearable="true" placeholder="ZT01733" />
  820. </el-col>
  821. </el-row>
  822. </el-form-item>
  823. </el-col>
  824. <el-col :span="6">
  825. <el-form-item label="辅电表" prop="name">
  826. <el-row :gutter="20">
  827. <el-col :span="12">
  828. <el-input v-model="formData3.辅电表" :clearable="true" placeholder="ZT01733" />
  829. </el-col>
  830. </el-row>
  831. </el-form-item>
  832. </el-col>
  833. </el-row>
  834. <el-row :gutter="20" style="margin-top: 10px;">
  835. <el-col :span="2">
  836. <el-form-item label="组员分配比例" prop="id"></el-form-item>
  837. </el-col>
  838. <el-col :span="2">
  839. </el-col>
  840. <el-col :span="2">
  841. </el-col>
  842. <el-col :span="2">
  843. </el-col>
  844. <el-col :span="2">
  845. </el-col>
  846. <el-col :span="2">
  847. </el-col>
  848. <el-col :span="2">
  849. </el-col>
  850. <el-col :span="2">
  851. </el-col>
  852. <el-col :span="2">
  853. </el-col>
  854. <el-col :span="2">
  855. </el-col>
  856. <el-col :span="2">
  857. <el-form-item label="特殊人员" prop="id"></el-form-item>
  858. </el-col>
  859. <el-col :span="2">
  860. <el-form-item label="拉料人员" prop="id"></el-form-item>
  861. </el-col>
  862. </el-row>
  863. <el-row :gutter="20" style="margin-top: 10px;">
  864. <el-col :span="2">
  865. <el-input v-model="formData3.sczl_bzdh" :clearable="true" placeholder="ZI00401" />
  866. </el-col>
  867. <el-col :span="2">
  868. <el-input v-model="formData3.sczl_bh1" @keyup.enter.native="getygsubmit($event, '1')" :clearable="true" placeholder="瞿春生" />
  869. </el-col>
  870. <el-col :span="2">
  871. <el-input v-model="formData3.sczl_bh2" @keyup.enter.native="getygsubmit($event, '2')" :clearable="true" placeholder="11.0" />
  872. </el-col>
  873. <el-col :span="2">
  874. <el-input v-model="formData3.sczl_bh3" @keyup.enter.native="getygsubmit($event, '3')" :clearable="true" placeholder="打包废纸" />
  875. </el-col>
  876. <el-col :span="2">
  877. <el-input v-model="formData3.sczl_bh4" @keyup.enter.native="getygsubmit($event, '4')" :clearable="true" placeholder="是" />
  878. </el-col>
  879. <el-col :span="2">
  880. <el-input v-model="formData3.sczl_bh5" @keyup.enter.native="getygsubmit($event, '5')" :clearable="true" placeholder="ZI00401" />
  881. </el-col>
  882. <el-col :span="2">
  883. <el-input v-model="formData3.sczl_bh6" @keyup.enter.native="getygsubmit($event, '6')" :clearable="true" placeholder="瞿春生" />
  884. </el-col>
  885. <el-col :span="2">
  886. <el-input v-model="formData3.sczl_bh7" @keyup.enter.native="getygsubmit($event, '7')" :clearable="true" placeholder="11.0" />
  887. </el-col>
  888. <el-col :span="2">
  889. <el-input v-model="formData3.sczl_bh8" @keyup.enter.native="getygsubmit($event, '8')" :clearable="true" placeholder="11.0" />
  890. </el-col>
  891. <el-col :span="2">
  892. <el-input v-model="formData3.sczl_bh9" @keyup.enter.native="getygsubmit($event, '9')" :clearable="true" placeholder="11.0" />
  893. </el-col>
  894. <el-col :span="2">
  895. <el-input v-model="formData3.sczl_bh10" @keyup.enter.native="getygsubmit($event, '10')" :clearable="true" placeholder="11.0" />
  896. </el-col>
  897. <el-col :span="2">
  898. <el-input v-model="formData3.llbh" :clearable="true" placeholder="11.0" />
  899. </el-col>
  900. </el-row>
  901. <el-row :gutter="20" style="margin-top: 10px;">
  902. <el-col :span="2">
  903. </el-col>
  904. <el-col :span="2">
  905. <el-input v-model="formData3.sczl_name1" :clearable="true" placeholder="瞿春生" />
  906. </el-col>
  907. <el-col :span="2">
  908. <el-input v-model="formData3.sczl_name2" :clearable="true" placeholder="11.0" />
  909. </el-col>
  910. <el-col :span="2">
  911. <el-input v-model="formData3.sczl_name3" :clearable="true" placeholder="打包废纸" />
  912. </el-col>
  913. <el-col :span="2">
  914. <el-input v-model="formData3.sczl_name4" :clearable="true" placeholder="是" />
  915. </el-col>
  916. <el-col :span="2">
  917. <el-input v-model="formData3.sczl_name5" :clearable="true" placeholder="ZI00401" />
  918. </el-col>
  919. <el-col :span="2">
  920. <el-input v-model="formData3.sczl_name6" :clearable="true" placeholder="瞿春生" />
  921. </el-col>
  922. <el-col :span="2">
  923. <el-input v-model="formData3.sczl_name7" :clearable="true" placeholder="11.0" />
  924. </el-col>
  925. <el-col :span="2">
  926. <el-input v-model="formData3.sczl_name8" :clearable="true" placeholder="11.0" />
  927. </el-col>
  928. <el-col :span="2">
  929. <el-input v-model="formData3.sczl_name9" :clearable="true" placeholder="11.0" />
  930. </el-col>
  931. <el-col :span="2">
  932. <el-input v-model="formData3.sczl_name10" :clearable="true" placeholder="11.0" />
  933. </el-col>
  934. <el-col :span="2">
  935. <el-input v-model="formData3.llname" :clearable="true" placeholder="11.0" />
  936. </el-col>
  937. </el-row>
  938. <el-row :gutter="20" style="margin-top: 10px;">
  939. <el-col :span="2">
  940. </el-col>
  941. <el-col :span="2">
  942. <el-input v-model="formData3.sczl_rate1" :clearable="true" placeholder="瞿春生" />
  943. </el-col>
  944. <el-col :span="2">
  945. <el-input v-model="formData3.sczl_rate2" :clearable="true" placeholder="11.0" />
  946. </el-col>
  947. <el-col :span="2">
  948. <el-input v-model="formData3.sczl_rate3" :clearable="true" placeholder="打包废纸" />
  949. </el-col>
  950. <el-col :span="2">
  951. <el-input v-model="formData3.sczl_rate4" :clearable="true" placeholder="是" />
  952. </el-col>
  953. <el-col :span="2">
  954. <el-input v-model="formData3.sczl_rate5" :clearable="true" placeholder="ZI00401" />
  955. </el-col>
  956. <el-col :span="2">
  957. <el-input v-model="formData3.sczl_rate6" :clearable="true" placeholder="瞿春生" />
  958. </el-col>
  959. <el-col :span="2">
  960. <el-input v-model="formData3.sczl_rate7" :clearable="true" placeholder="11.0" />
  961. </el-col>
  962. <el-col :span="2">
  963. <el-input v-model="formData3.sczl_rate8" :clearable="true" placeholder="11.0" />
  964. </el-col>
  965. <el-col :span="2">
  966. <el-input v-model="formData3.sczl_rate9" :clearable="true" placeholder="11.0" />
  967. </el-col>
  968. <el-col :span="2">
  969. <el-input v-model="formData3.sczl_rate10" :clearable="true" placeholder="11.0" />
  970. </el-col>
  971. <el-col :span="2">
  972. </el-col>
  973. </el-row>
  974. <div style="width:85% margin-top:0px;" >
  975. <el-table
  976. tooltip-effect="dark"
  977. :data="chanliangselectData"
  978. row-key="ID"
  979. highlight-current-row="true"
  980. border
  981. style="width:85% "
  982. height="300px"
  983. @selection-change="chanliangSelectionChange"
  984. @row-dblclick="handleSelectClick"
  985. >
  986. <!-- 添加一个自定义的列,用于显示单选框 -->
  987. <el-table-column type="selection" width="55" label="选择" align="center"></el-table-column>
  988. <el-table-column
  989. prop="batch"
  990. label="物料编号"
  991. width="340"
  992. />
  993. <el-table-column
  994. prop="BOM_物料名称"
  995. label="物料名称"
  996. width="340"
  997. />
  998. <el-table-column
  999. prop="采购单号"
  1000. label="采购单号"
  1001. width="150"
  1002. />
  1003. <el-table-column
  1004. prop="st_wlbh"
  1005. label="供方批次"
  1006. width="150"
  1007. />
  1008. <el-table-column
  1009. prop="卷号"
  1010. label="卷号"
  1011. width="150"
  1012. />
  1013. </el-table>
  1014. </div>
  1015. <template #footer>
  1016. <div class="dialog-footer">
  1017. <el-button @click="closeDialog">取 消</el-button>
  1018. <el-button type="primary" @click="chanliangenterDialog">确 定</el-button>
  1019. </div>
  1020. </template>
  1021. </el-dialog>
  1022. </el-main>
  1023. </el-container>
  1024. </el-container>
  1025. </div>
  1026. </template>
  1027. <script setup>
  1028. import {
  1029. createCompany,
  1030. deleteCompany,
  1031. deleteCompanyByIds,
  1032. updateCompany,
  1033. findCompany,
  1034. getCompanyList
  1035. } from '@/api/company'
  1036. import {
  1037. facilityTab,
  1038. facilitychanLiang,
  1039. facilityInspect,
  1040. facilityProduction,
  1041. facilityTeam,
  1042. facilityMachineList,
  1043. facilitySpotCheckItem,
  1044. facilityInspectionItem,
  1045. reportProduceInfo,
  1046. reportName,
  1047. reportInfo,
  1048. reportMachineMac,
  1049. facilityWorklist,
  1050. setProcessStatus,
  1051. submitDailyProduction,
  1052. facilityDetail,
  1053. inspectionRecord,
  1054. getYg
  1055. } from '@/api/jixiaoguanli/jitairibaobiao'
  1056. import {
  1057. demoCustomer
  1058. } from "@/api/demo";
  1059. // 全量引入格式化工具 请按需保留
  1060. import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
  1061. import { ElMessage, ElMessageBox } from 'element-plus'
  1062. import { ref, reactive } from 'vue'
  1063. defineOptions({
  1064. name: 'Company'
  1065. })
  1066. let checked1=ref(false)
  1067. let checked2=ref(false)
  1068. let checked3=ref(false)
  1069. const detailData = reactive([])
  1070. const treeData=ref([
  1071. {
  1072. label: '胶印车间',
  1073. level: 1 ,
  1074. children: [{
  1075. label: 'JY01# 【海德堡对开八色平板胶印机】',
  1076. level: 2,
  1077. }]}
  1078. ])
  1079. let dianjiantreeData;
  1080. let JTMC=ref()
  1081. const sbzyData = reactive([])
  1082. const FPData = reactive([])
  1083. const CLMXData = reactive([])
  1084. let JYData = reactive([])
  1085. const handleNodeClick = (nodeData,node) => {
  1086. //存放当前节点的nodeId
  1087. if (nodeData.level === 1) {
  1088. console.log(node.label); // 第一级节点
  1089. } else if (nodeData.level === 2) {
  1090. console.log(node.label); // 第二级节点
  1091. JTMC=node.label.split("【")[0]
  1092. FacilityProduction()
  1093. FacilityWorklist()
  1094. FacilityTeam(JTMC)
  1095. // InspectionRecord()
  1096. // FacilityDetail()
  1097. // ReportProduceInfo()
  1098. console.log(JTMC)
  1099. } else if (nodeData.level === 3) {
  1100. console.log(node.label); // 第三级节点
  1101. }
  1102. // console.log(node.label)
  1103. }
  1104. //当前生产订单
  1105. const FacilityProduction = async () => {
  1106. const response = await facilityProduction({machine:JTMC});
  1107. if (response.code === 0) {
  1108. console.log(response)
  1109. // 填充formData对象的基本字段
  1110. formData.value.工单编号 = response.data.工单编号;
  1111. formData.value.印件编号 = response.data.印件编号;
  1112. formData.value.工序名称 = response.data.工序名称;
  1113. formData.value.产品名称 = response.data.产品名称;
  1114. // console.log()
  1115. formData.value.班组 = response.data.班组;
  1116. // 填充sczl_bh和sczl_name字段
  1117. for (let i = 1; i <= 10; i++) {
  1118. const sczl_bh = `sczl_bh${i}`;
  1119. const sczl_name = `sczl_name${i}`;
  1120. if (response.data[sczl_bh] ) {
  1121. formData.value[sczl_bh] = response.data[sczl_bh]['员工编号'];
  1122. formData.value[sczl_name] = response.data[sczl_bh]['员工姓名'];
  1123. console.log(response.data[sczl_bh]['员工姓名'])
  1124. console.log(formData.value.sczl_bh)
  1125. // console.log(sczl_name)
  1126. } else {
  1127. // 如果字段不存在,可以在这里进行处理
  1128. // console.log('2');
  1129. // formData.value[sczl_bh] = response.data[sczl_bh]['员工编号'];
  1130. // formData.value[sczl_name] = response.data[sczl_bh]['员工姓名'];
  1131. // console.log(formData.value.sczl_bh)
  1132. // console.log(sczl_name)
  1133. }
  1134. }
  1135. InspectionRecord()
  1136. FacilityDetail()
  1137. // 输出填充后的formData对象
  1138. // console.log(formData.value);
  1139. }
  1140. // getTableData()
  1141. }
  1142. //设备工作清单
  1143. const FacilityWorklist = async () => {
  1144. const response = await facilityWorklist({machine:JTMC});
  1145. if (response.code === 0) {
  1146. console.log(response)
  1147. sbzyData.splice(0, sbzyData.length, ...response.data);
  1148. }
  1149. }
  1150. //检验记录
  1151. const InspectionRecord = async () => {
  1152. console.log(formData.value.班组)
  1153. const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2312191',team:formData.value.班组});
  1154. console.log(response)
  1155. if(response.code==0){
  1156. // 提取 inspectiontime 作为列名
  1157. // Extract inspectiontime as columnNames
  1158. columnNames = response.data.inspectiontime;
  1159. // Populate drzcData with row data
  1160. for (const key in response.data) {
  1161. if (key !== 'inspectiontime') {
  1162. const item = response.data[key];
  1163. const rowData = {
  1164. '工单编号': item['工单编号'],
  1165. '印件号': item['印件号'],
  1166. '工序名称': item['工序名称'],
  1167. '检验项目': item['检验项目']
  1168. };
  1169. // Initialize time columns with '—'
  1170. columnNames.forEach(time => {
  1171. rowData[time] = '';
  1172. });
  1173. // Split inspectresult and fill the corresponding time columns
  1174. const results = item['inspectresult'].split(',');
  1175. results.forEach(result => {
  1176. if (columnNames.includes(result)) {
  1177. rowData[result] = '√';
  1178. }else{rowData[result] = ''}
  1179. });
  1180. // Add the row data to drzcData
  1181. JYData.push(rowData);
  1182. }
  1183. }
  1184. console.log(JYData);
  1185. }
  1186. }
  1187. //当班产量明细
  1188. const FacilityDetail = async () => {
  1189. const response = await facilityDetail({ machine: JTMC, Gd_gdbh: '2312191', team: formData.value.班组 });
  1190. if (response.code === 0) {
  1191. console.log(response);
  1192. CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
  1193. }
  1194. };
  1195. //员工编号回车事件
  1196. const getygsubmit = (event, inputName) => {
  1197. console.log(inputName)
  1198. let combinedString = 'sczl_bh' + inputName;
  1199. console.log(combinedString)
  1200. // let variableName = 'sczl_gdbh'+inputName;
  1201. let variableValue = eval('formData3.value.' + combinedString);
  1202. console.log(variableValue)
  1203. GetYg(variableValue,inputName)
  1204. }
  1205. //获取员工信息
  1206. const GetYg = async (value,inputName) => {
  1207. const response = await getYg({sczl_bh:value});
  1208. console.log(response)
  1209. if (response.code === 0) {
  1210. console.log(response.data.ygxm)
  1211. let Bname = 'sczl_name' + inputName;
  1212. formData3.value[Bname]=response.data.ygxm
  1213. // console.log(formData.value[Bname])
  1214. }
  1215. }
  1216. // 验证规则
  1217. const rule = reactive({
  1218. })
  1219. const searchRule = reactive({
  1220. createdAt: [
  1221. { validator: (rule, value, callback) => {
  1222. if (searchInfo.value.startCreatedAt && !searchInfo.value.endCreatedAt) {
  1223. callback(new Error('请填写结束日期'))
  1224. } else if (!searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt) {
  1225. callback(new Error('请填写开始日期'))
  1226. } else if (searchInfo.value.startCreatedAt && searchInfo.value.endCreatedAt && (searchInfo.value.startCreatedAt.getTime() === searchInfo.value.endCreatedAt.getTime() || searchInfo.value.startCreatedAt.getTime() > searchInfo.value.endCreatedAt.getTime())) {
  1227. callback(new Error('开始日期应当早于结束日期'))
  1228. } else {
  1229. callback()
  1230. }
  1231. }, trigger: 'change' }
  1232. ],
  1233. })
  1234. const elFormRef = ref()
  1235. const elSearchFormRef = ref()
  1236. // =========== 表格控制部分 ===========
  1237. const page = ref(1)
  1238. const total = ref(0)
  1239. const pageSize = ref(10)
  1240. const tableData = ref([])
  1241. const searchInfo = ref({})
  1242. // 重置
  1243. const onReset = () => {
  1244. searchInfo.value = {}
  1245. getTableData()
  1246. }
  1247. // 搜索
  1248. const onSubmit = () => {
  1249. elSearchFormRef.value?.validate(async(valid) => {
  1250. if (!valid) return
  1251. page.value = 1
  1252. pageSize.value = 10
  1253. getTableData()
  1254. })
  1255. }
  1256. // 分页
  1257. const handleSizeChange = (val) => {
  1258. pageSize.value = val
  1259. getTableData()
  1260. }
  1261. // 修改页面容量
  1262. const handleCurrentChange = (val) => {
  1263. page.value = val
  1264. getTableData()
  1265. }
  1266. const getTableData = async () => {
  1267. const response = await facilityTab();
  1268. if (response.code === 0 && response.data) {
  1269. const workshops = response.data; // 车间数据
  1270. // 在推送新项之前将 treeData 重置为空数组
  1271. treeData.value = []; // 使用 .value 访问响应式引用的值
  1272. for (const workshopName in workshops) {
  1273. const workshopNode = {
  1274. label: workshopName,
  1275. children: [],
  1276. level: 1 // 添加层级属性
  1277. };
  1278. const machines = workshops[workshopName]; // 车间下的机器
  1279. for (const machineName in machines) {
  1280. const machineNode = {
  1281. label: machineName,
  1282. children: [],
  1283. level: 2, // 添加层级属性
  1284. parentNode: workshopNode
  1285. };
  1286. // Now that machineNode is initialized, you can refer to it
  1287. const childrenNodes = machines[machineName].map(dateTime => {
  1288. const dateOnly = dateTime.split(' ')[0];
  1289. return {
  1290. label: dateOnly,
  1291. level: 3, // 添加层级属性
  1292. parentNode: machineNode
  1293. };
  1294. });
  1295. // Assign the childrenNodes to the machineNode's children property
  1296. machineNode.children = childrenNodes;
  1297. // Finally, push the machineNode to the workshopNode's children array
  1298. workshopNode.children.push(machineNode);
  1299. }
  1300. // 将 workshopNode 推送到响应式 treeData 数组
  1301. treeData.value.push(workshopNode);
  1302. }
  1303. }
  1304. };
  1305. // 查询
  1306. const getTableList = async() => {
  1307. const table = await getCompanyList({ page: page.value, pageSize: pageSize.value, ...searchInfo.value })
  1308. if (table.code === 0) {
  1309. tableData.value = table.data.list
  1310. total.value = table.data.total
  1311. page.value = table.data.page
  1312. pageSize.value = table.data.pageSize
  1313. }
  1314. }
  1315. // getTableData()
  1316. //删除
  1317. function onDel() {
  1318. }
  1319. //完工
  1320. function onOver() {
  1321. SetProcessStatus()
  1322. }
  1323. //完工事件
  1324. const SetProcessStatus = async () => {
  1325. console.log(formData.value.工单编号)
  1326. console.log(formData.value.印件编号)
  1327. // console.log(formData.value.工单编号)
  1328. const RESCODE={
  1329. order:'2401714',
  1330. yjno:'1',
  1331. gxh:'1',
  1332. }
  1333. const response = await setProcessStatus(RESCODE);
  1334. if (response.code === 0) {
  1335. console.log(333)
  1336. }
  1337. console.log(response)
  1338. }
  1339. import { nextTick } from 'vue';
  1340. //设备点检
  1341. function ondianjian() {
  1342. getSpotCheckItem(JTMC).then(treeData => {
  1343. if (treeData) {
  1344. // 如果获取成功,treeData 就是我们需要的树形结构数据
  1345. dianjiantreeData = treeData;
  1346. console.log('222');
  1347. console.log(dianjiantreeData);
  1348. // 使用 nextTick 来确保在更新 dianjianVisible 后立即刷新视图
  1349. nextTick(() => {
  1350. dianjianVisible.value = true;
  1351. });
  1352. // 这里可以处理treeData,例如将其赋值给某个状态管理变量或者用于渲染界面
  1353. } else {
  1354. // 如果获取失败,则treeData为null
  1355. console.log('获取巡检项目树形结构数据失败');
  1356. }
  1357. });
  1358. }
  1359. const chanliangselectData = reactive([])
  1360. const chanliangVisible = ref(false)
  1361. //日产量上报
  1362. function onchanliang() {
  1363. console.log(JTMC.split("#")[0]); // 通过value属性获取ref对象的值,然后再调用split方法
  1364. chanliangVisible.value=true
  1365. ReportInfo()
  1366. }
  1367. //日产量详情获取
  1368. const ReportInfo = async () => {
  1369. const response = await reportInfo({ machine: JTMC.split("#")[0] });
  1370. if (response.code === 0) {
  1371. const { order_info, class: classInfo } = response.data;
  1372. const newData = {
  1373. order: order_info.order,
  1374. yjno: order_info.yjno,
  1375. gxh: order_info.gxh,
  1376. gxmc: order_info.gxmc,
  1377. product_name: order_info.product_name,
  1378. yj_name: order_info.yj_name,
  1379. gy_name: order_info.gy_name,
  1380. sczl_jtbh: classInfo.sczl_jtbh,
  1381. sczl_bzdh: classInfo.sczl_bzdh,
  1382. sys_id: classInfo.sys_id,
  1383. sys_rq: classInfo.sys_rq,
  1384. mod_rq: classInfo.mod_rq,
  1385. UniqId: classInfo.UniqId,
  1386. sczl_bh1: classInfo.sczl_bh1,
  1387. sczl_bh2: classInfo.sczl_bh2,
  1388. sczl_bh3: classInfo.sczl_bh3,
  1389. sczl_bh4: classInfo.sczl_bh4,
  1390. sczl_bh5: classInfo.sczl_bh5,
  1391. sczl_bh6: classInfo.sczl_bh6,
  1392. sczl_bh7: classInfo.sczl_bh7,
  1393. sczl_bh8: classInfo.sczl_bh8,
  1394. sczl_bh9: classInfo.sczl_bh9,
  1395. sczl_bh10: classInfo.sczl_bh10,
  1396. sczl_name1: classInfo.sczl_name1,
  1397. sczl_name2: classInfo.sczl_name2,
  1398. sczl_name3: classInfo.sczl_name3,
  1399. sczl_name4: classInfo.sczl_name4,
  1400. sczl_name5: classInfo.sczl_name5,
  1401. sczl_name6: classInfo.sczl_name6,
  1402. sczl_name7: classInfo.sczl_name7,
  1403. sczl_name8: classInfo.sczl_name8,
  1404. sczl_name9: classInfo.sczl_name9,
  1405. sczl_name10: classInfo.sczl_name10,
  1406. sczl_rate1: classInfo.sczl_rate1,
  1407. sczl_rate2: classInfo.sczl_rate2,
  1408. sczl_rate3: classInfo.sczl_rate3,
  1409. sczl_rate4: classInfo.sczl_rate4,
  1410. sczl_rate5: classInfo.sczl_rate5,
  1411. sczl_rate6: classInfo.sczl_rate6,
  1412. sczl_rate7: classInfo.sczl_rate7,
  1413. sczl_rate8: classInfo.sczl_rate8,
  1414. sczl_rate9: classInfo.sczl_rate9,
  1415. sczl_rate10: classInfo.sczl_rate10,
  1416. };
  1417. formData3.value = { ...formData3.value, ...newData };
  1418. chanliangselectData.splice(0, chanliangselectData.length, ...response.data.bom)
  1419. }
  1420. // getTableData()
  1421. }
  1422. //日报表弹窗确定
  1423. const chanliangenterDialog = async () => {
  1424. SubmitDailyProduction()
  1425. }
  1426. //日报表上传
  1427. const SubmitDailyProduction = async () => {
  1428. const restoredData = {
  1429. sczl_gdbh:formData3.value.order,
  1430. sczl_yjno:formData3.value.yjno,
  1431. sczl_gxh:formData3.value.gxh,
  1432. sczl_gxmc: formData3.value.gxmc,
  1433. sczl_bzdh: formData3.value.sczl_bzdh,
  1434. sczl_bh1: formData3.value.sczl_bh1,
  1435. sczl_bh2: formData3.value.sczl_bh2,
  1436. sczl_bh3: formData3.value.sczl_bh3,
  1437. sczl_bh4: formData3.value.sczl_bh4,
  1438. sczl_bh5: formData3.value.sczl_bh5,
  1439. sczl_bh6: formData3.value.sczl_bh6,
  1440. sczl_bh7: formData3.value.sczl_bh7,
  1441. sczl_bh8: formData3.value.sczl_bh8,
  1442. sczl_bh9: formData3.value.sczl_bh9,
  1443. sczl_bh10: formData3.value.sczl_bh10,
  1444. sczl_rate1: formData3.value.sczl_rate1,
  1445. sczl_rate2: formData3.value.sczl_rate2,
  1446. sczl_rate3: formData3.value.sczl_rate3,
  1447. sczl_rate4: formData3.value.sczl_rate4,
  1448. sczl_rate5: formData3.value.sczl_rate5,
  1449. sczl_rate6: formData3.value.sczl_rate6,
  1450. sczl_rate7: formData3.value.sczl_rate7,
  1451. sczl_rate8: formData3.value.sczl_rate8,
  1452. sczl_rate9: formData3.value.sczl_rate9,
  1453. sczl_rate10: formData3.value.sczl_rate10,
  1454. sczl_jtbh: 'JY01',
  1455. sczl_rq: formData3.value.日期,
  1456. sczl_num: formData3.value.流程标牌,
  1457. sczl_sj1: formData3.value.上机时间,
  1458. sczl_sj2: formData3.value.下机时间,
  1459. sczl_cl: formData3.value.产量,
  1460. sczl_zcfp: formData3.value.制程废品,
  1461. sczl_zccp: formData3.value.制程次品,
  1462. last_fp: formData3.value.前工序废,
  1463. less_sl: formData3.value.来料异常,
  1464. sczl_ls: formData3.value.联数,
  1465. sczl_ms: formData3.value.墨色,
  1466. zb_time: formData3.value.装版总工时,
  1467. dy_time: formData3.value.打样总工时,
  1468. run_time: formData3.value.通电工时,
  1469. sczl_dedh: formData3.value.定额代号,
  1470. code: formData3.value.码包,
  1471. main_meter: formData3.value.主电表,
  1472. auxiliary_meter: formData3.value.辅电表,
  1473. bom: formData3.value.formattedArray
  1474. }
  1475. console.log(restoredData)
  1476. console.log(formData3.value.formattedArray)
  1477. const response = await submitDailyProduction(restoredData);
  1478. console.log(response)
  1479. if (response.code === 0) {
  1480. }
  1481. }
  1482. // let formattedArray
  1483. // 产量单选
  1484. const chanliangSelectionChange = (val) => {
  1485. // if(val.length>0){
  1486. // multipleSelection.value = val
  1487. // const lenth=val.length
  1488. // lastCellValue=val[lenth-1].UniqId
  1489. // console.log(val)
  1490. // val.splice(0, val.length); // 清空 val 数组
  1491. // console.log(lastCellValue)
  1492. // }
  1493. const selectedItems =val
  1494. // 存储batch和st_wlbh的数组
  1495. formData3.value.formattedArray = selectedItems.map(item => `${item.batch}-${item.st_wlbh}`).join(',');
  1496. console.log(formData3.value.formattedArray);
  1497. // console.log(selectedItems)
  1498. }
  1499. //获取设备点检->检验项目
  1500. const FacilityInspectionItem = async (value) => {
  1501. try {
  1502. // 调用接口获取巡检项目数据
  1503. const response = await facilityInspectionItem({ unitName: value });
  1504. // 检查接口返回的状态码
  1505. if (response.code === 0) {
  1506. console.log(response)
  1507. dianjianselectData.splice(0, dianjianselectData.length, ...response.data)
  1508. }
  1509. } catch (error) {
  1510. // 捕获并打印异常
  1511. console.error("获取巡检项目数据出错:" + error);
  1512. return null;
  1513. }
  1514. };
  1515. //树形结构单机
  1516. const dianjianselectData = reactive([])
  1517. const dianjianNodeClick = (node, check, nodeData) => {
  1518. console.log('111')
  1519. if (node.children && node.children.length > 0) {
  1520. // 点击的是父节点,且有子节点
  1521. // 执行相应的父节点单击事件处理逻辑
  1522. // 这里可以添加你想要的处理逻辑,比如展开/折叠节点等
  1523. } else {
  1524. // 点击的是子节点,或者没有子节点
  1525. // 执行相应的子节点单击事件处理逻辑
  1526. FacilityInspectionItem(node.label)
  1527. }
  1528. };
  1529. let pandingfangfa=ref()
  1530. //检验项目单击
  1531. const dianjianhandle = async (val, row) => {
  1532. try {
  1533. console.log(val.判定标准);
  1534. pandingfangfa.value = val.判定标准;
  1535. } catch (error) {
  1536. console.error('An error occurred:', error);
  1537. }
  1538. };
  1539. const rowClassName = (row, column) => {
  1540. try {
  1541. if (row.unchecked) {
  1542. return 'row-yellow';
  1543. }
  1544. return '';
  1545. } catch (error) {
  1546. console.error('An error occurred:', error);
  1547. return '';
  1548. }
  1549. };
  1550. // 异步函数,用于获取指定设备的巡检项目,并且将结果格式化为树形结构数据
  1551. const getSpotCheckItem = async (machineName) => {
  1552. try {
  1553. // 调用接口获取巡检项目数据
  1554. const response = await facilitySpotCheckItem({ machine: machineName });
  1555. // 检查接口返回的状态码
  1556. if (response.code === 0) {
  1557. // 构建树形结构数据
  1558. const childrenData = Object.entries(response.data).map(([id, label]) => {
  1559. return {
  1560. id, // 子节点的唯一标识
  1561. label, // 子节点的标签
  1562. children: [] // 初始化子节点数组
  1563. };
  1564. });
  1565. // 创建包含父节点的树形结构数据
  1566. const treeData = [{
  1567. id: machineName, // 父节点的唯一标识
  1568. label: machineName, // 父节点的标签
  1569. children: childrenData // 子节点数据
  1570. }];
  1571. // 返回构建好的树形结构数据
  1572. return treeData;
  1573. } else {
  1574. // 如果接口返回的状态码不是0,打印错误信息
  1575. console.error("接口返回错误:" + response.msg);
  1576. return null;
  1577. }
  1578. } catch (error) {
  1579. // 捕获并打印异常
  1580. console.error("获取巡检项目数据出错:" + error);
  1581. return null;
  1582. }
  1583. };
  1584. // 班组人员及分配比例
  1585. const FacilityTeam = async (value) => {
  1586. const response = await facilityTeam({ machine: value });
  1587. if (response.code === 0) {
  1588. console.log(response);
  1589. // 清空 bzData 数组
  1590. bzData.splice(0, bzData.length);
  1591. // 遍历接口返回的数据,并给每个对象添加 JTMC 属性
  1592. const updatedData = response.data.map(item => {
  1593. return { ...item, JTMC: value }; // 添加 JTMC 属性
  1594. });
  1595. // 将更新后的数据添加到 bzData 数组
  1596. bzData.push(...updatedData);
  1597. FPData.push(...updatedData)
  1598. console.log(FPData)
  1599. }
  1600. };
  1601. //班组维护
  1602. function onBZ() {
  1603. FacilityTeam(JTMC)
  1604. fetchData()
  1605. detailShow.value=true
  1606. console.log('2222')
  1607. }
  1608. // 下拉框选项数据
  1609. const dropdownOptions = ref([]);
  1610. // 选中的选项
  1611. const selectedOption = ref('');
  1612. // 获取接口数据并转换为下拉框需要的格式
  1613. const fetchData = async () => {
  1614. try {
  1615. // Simulate API call
  1616. const response = await facilityMachineList();
  1617. if (response.code === 0) {
  1618. // Transform data format
  1619. const options = response.data.map((item) => ({
  1620. label: item,
  1621. value: item
  1622. }));
  1623. dropdownOptions.value = options;
  1624. // Default to selecting the first option
  1625. const defaultOption = options.find(option => option.value === JTMC);
  1626. if (defaultOption) {
  1627. selectedOption.value = defaultOption.value;
  1628. } else if (options.length > 0) {
  1629. // 如果 myDefaultValue 不在选项中,选择第一个选项
  1630. selectedOption.value = options[0].value;
  1631. }
  1632. }
  1633. } catch (error) {
  1634. console.error('Error fetching data:', error);
  1635. // Handle the error appropriately
  1636. }
  1637. };
  1638. // formData
  1639. let BZMC=ref()
  1640. let lastCellValue=ref()
  1641. let parts =reactive([])
  1642. const formData3= ref({
  1643. order:'',
  1644. yjno:'',
  1645. gxh:'',
  1646. gxmc:'',
  1647. product_name:'',
  1648. yj_name:'',
  1649. gy_name:'',
  1650. sczl_jtbh:'',
  1651. sczl_bzdh:'',
  1652. sys_id:'',
  1653. sys_rq:'',
  1654. mod_rq:'',
  1655. UniqId:'',
  1656. sczl_bh1:'',
  1657. sczl_bh2:'',
  1658. sczl_bh3:'',
  1659. sczl_bh4:'',
  1660. sczl_bh5:'',
  1661. sczl_bh6:'',
  1662. sczl_bh7:'',
  1663. sczl_bh8:'',
  1664. sczl_bh9:'',
  1665. sczl_bh10:'',
  1666. sczl_name1:'',
  1667. sczl_name2:'',
  1668. sczl_name3:'',
  1669. sczl_name4:'',
  1670. sczl_name5:'',
  1671. sczl_name6:'',
  1672. sczl_name7:'',
  1673. sczl_name8:'',
  1674. sczl_name9:'',
  1675. sczl_name10:'',
  1676. sczl_rate1:'',
  1677. sczl_rate2:'',
  1678. sczl_rate3:'',
  1679. sczl_rate4:'',
  1680. sczl_rate5:'',
  1681. sczl_rate6:'',
  1682. sczl_rate7:'',
  1683. sczl_rate8:'',
  1684. sczl_rate9:'',
  1685. sczl_rate10:'',
  1686. 日期:'',
  1687. 流程标牌:'',
  1688. 上机时间:'',
  1689. 下机时间:'',
  1690. 产量:'',
  1691. 制程废品:'',
  1692. 制程次品:'',
  1693. 前工序废:'',
  1694. 来料异常:'',
  1695. 联数:'',
  1696. 墨色:'',
  1697. 装版总工时:'',
  1698. 打样总工时:'',
  1699. 通电工时:'',
  1700. 定额代号:'',
  1701. 码包:'',
  1702. 主电表:'',
  1703. 辅电表:'',
  1704. formattedArray:'',
  1705. })
  1706. // 自动化生成的字典(可能为空)以及字段
  1707. const formData= ref({
  1708. 工单编号:'',
  1709. 印件编号:'',
  1710. 工序名称:'',
  1711. 产品名称:'',
  1712. sczl_bh1:'',
  1713. sczl_bh2:'',
  1714. sczl_bh3:'',
  1715. sczl_bh4:'',
  1716. sczl_bh5:'',
  1717. sczl_bh6:'',
  1718. sczl_bh7:'',
  1719. sczl_bh8:'',
  1720. sczl_bh9:'',
  1721. sczl_bh10:'',
  1722. sczl_name1:'',
  1723. sczl_name2:'',
  1724. sczl_name3:'',
  1725. sczl_name4:'',
  1726. sczl_name5:'',
  1727. sczl_name6:'',
  1728. sczl_name7:'',
  1729. sczl_name8:'',
  1730. sczl_name9:'',
  1731. sczl_name10:'',
  1732. 班组:'',
  1733. })
  1734. const formDatasData= reactive([])
  1735. const formDatas = ref({
  1736. code1:'',
  1737. code2:'',
  1738. code3:'',
  1739. code4:'',
  1740. code5:'',
  1741. code6:'',
  1742. code7:'',
  1743. code8:'',
  1744. code9:'',
  1745. code10:'',
  1746. name1:'',
  1747. name2:'',
  1748. name3:'',
  1749. name4:'',
  1750. name5L:'',
  1751. name6:'',
  1752. name7:'',
  1753. name8:'',
  1754. name9:'',
  1755. name10:'',
  1756. percentage1:'',
  1757. percentage2:'',
  1758. percentage3:'',
  1759. percentage4:'',
  1760. percentage5:'',
  1761. percentage6:'',
  1762. percentage7:'',
  1763. percentage8:'',
  1764. percentage9:'',
  1765. percentage10:'',
  1766. })
  1767. //班组单击
  1768. const BZhandle = (val, row) => {
  1769. formDatas.value = {};
  1770. for (const key in val) {
  1771. if (val[key] === 0) {
  1772. break;
  1773. }
  1774. const parts = val[key].split(/[\s()]+/);
  1775. const code = parts[0];
  1776. const name = parts[1];
  1777. const percentage = parts[2];
  1778. // 根据索引填充不同的字段
  1779. const index = parseInt(key) + 1; // 索引从1开始
  1780. formDatas.value['code' + index] = code;
  1781. formDatas.value['name' + index] = name;
  1782. formDatas.value['percentage' + index] = percentage;
  1783. }
  1784. };
  1785. // ============== 表格控制部分结束 ===============
  1786. // 获取需要的字典 可能为空 按需保留
  1787. const setOptions = async () =>{
  1788. }
  1789. // 获取需要的字典 可能为空 按需保留
  1790. setOptions()
  1791. // 多选数据
  1792. const multipleSelection = ref([])
  1793. // 多选
  1794. const handleSelectionChange = (val) => {
  1795. multipleSelection.value = val
  1796. }
  1797. // 删除行
  1798. const deleteRow = (row) => {
  1799. ElMessageBox.confirm('确定要删除吗?', '提示', {
  1800. confirmButtonText: '确定',
  1801. cancelButtonText: '取消',
  1802. type: 'warning'
  1803. }).then(() => {
  1804. deleteCompanyFunc(row)
  1805. })
  1806. }
  1807. // 批量删除控制标记
  1808. const deleteVisible = ref(false)
  1809. // 多选删除
  1810. const onDelete = async() => {
  1811. const ids = []
  1812. if (multipleSelection.value.length === 0) {
  1813. ElMessage({
  1814. type: 'warning',
  1815. message: '请选择要删除的数据'
  1816. })
  1817. return
  1818. }
  1819. multipleSelection.value &&
  1820. multipleSelection.value.map(item => {
  1821. ids.push(item.ID)
  1822. })
  1823. const res = await deleteCompanyByIds({ ids })
  1824. if (res.code === 0) {
  1825. ElMessage({
  1826. type: 'success',
  1827. message: '删除成功'
  1828. })
  1829. if (tableData.value.length === ids.length && page.value > 1) {
  1830. page.value--
  1831. }
  1832. deleteVisible.value = false
  1833. getTableData()
  1834. }
  1835. }
  1836. // 行为控制标记(弹窗内部需要增还是改)
  1837. const type = ref('')
  1838. // 更新行
  1839. const updateCompanyFunc = async(row) => {
  1840. const res = await findCompany({ ID: row.ID })
  1841. type.value = 'update'
  1842. if (res.code === 0) {
  1843. formData.value = res.data.recompany
  1844. dialogFormVisible.value = true
  1845. }
  1846. }
  1847. // 删除行
  1848. const deleteCompanyFunc = async (row) => {
  1849. const res = await deleteCompany({ ID: row.ID })
  1850. if (res.code === 0) {
  1851. ElMessage({
  1852. type: 'success',
  1853. message: '删除成功'
  1854. })
  1855. if (tableData.value.length === 1 && page.value > 1) {
  1856. page.value--
  1857. }
  1858. getTableData()
  1859. }
  1860. }
  1861. // 弹窗控制标记
  1862. const dialogFormVisible = ref(false)
  1863. const dianjianVisible = ref(false)
  1864. // 查看详情控制标记
  1865. const detailShow = ref(false)
  1866. const bzData = reactive([])
  1867. // 打开详情弹窗
  1868. const openDetailShow = () => {
  1869. detailShow.value = true
  1870. }
  1871. // 打开详情
  1872. const getDetails = async (row) => {
  1873. // 打开弹窗
  1874. const res = await findCompany({ ID: row.ID })
  1875. if (res.code === 0) {
  1876. formData.value = res.data.recompany
  1877. openDetailShow()
  1878. }
  1879. }
  1880. // 关闭详情弹窗
  1881. const closeDetailShow = () => {
  1882. detailShow.value = false
  1883. // formData.value = {
  1884. // address: '',
  1885. // image: '',
  1886. // name: '',
  1887. // }
  1888. }
  1889. // 打开弹窗
  1890. const openDialog = () => {
  1891. // type.value = 'create'
  1892. // console.log('222')
  1893. // FacilityInspect()
  1894. // dialogFormVisible.value = true
  1895. }
  1896. let drzcData=[]
  1897. let columnNames=[]
  1898. //当日制程检验记录
  1899. const FacilityInspect = async () => {
  1900. const response = await facilityInspect({machine:'JY01#',date:'2024-01-04'});
  1901. console.log(response)
  1902. if(response.code==0){
  1903. // 提取 inspectiontime 作为列名
  1904. // Extract inspectiontime as columnNames
  1905. columnNames = response.data.inspectiontime;
  1906. // Populate drzcData with row data
  1907. for (const key in response.data) {
  1908. if (key !== 'inspectiontime') {
  1909. const item = response.data[key];
  1910. const rowData = {
  1911. '工单编号': item['工单编号'],
  1912. '印件号': item['印件号'],
  1913. '工序名称': item['工序名称'],
  1914. '检验项目': item['检验项目']
  1915. };
  1916. // Initialize time columns with '—'
  1917. columnNames.forEach(time => {
  1918. rowData[time] = '';
  1919. });
  1920. // Split inspectresult and fill the corresponding time columns
  1921. const results = item['inspectresult'].split(',');
  1922. results.forEach(result => {
  1923. if (columnNames.includes(result)) {
  1924. rowData[result] = '√';
  1925. }else{rowData[result] = ''}
  1926. });
  1927. // Add the row data to drzcData
  1928. drzcData.push(rowData);
  1929. }
  1930. }
  1931. console.log(drzcData);
  1932. }
  1933. }
  1934. // 关闭弹窗
  1935. const closeDialog = () => {
  1936. dialogFormVisible.value = false
  1937. formData.value = {
  1938. address: '',
  1939. image: '',
  1940. name: '',
  1941. }
  1942. }
  1943. // 弹窗确定
  1944. const enterDialog = async () => {
  1945. elFormRef.value?.validate( async (valid) => {
  1946. if (!valid) return
  1947. let res
  1948. switch (type.value) {
  1949. case 'create':
  1950. res = await createCompany(formData.value)
  1951. break
  1952. case 'update':
  1953. res = await updateCompany(formData.value)
  1954. break
  1955. default:
  1956. res = await createCompany(formData.value)
  1957. break
  1958. }
  1959. if (res.code === 0) {
  1960. ElMessage({
  1961. type: 'success',
  1962. message: '创建/更改成功'
  1963. })
  1964. closeDialog()
  1965. getTableData()
  1966. }
  1967. })
  1968. }
  1969. </script>
  1970. <style>
  1971. .JKWTree-container {
  1972. display: flex;
  1973. }
  1974. .JKWTree-tree {
  1975. width: 300px;
  1976. background-color: #fff;
  1977. padding: 10px;
  1978. margin-right: 20px;
  1979. }
  1980. .JKWTree-tree h3 {
  1981. font-size: 15px;
  1982. font-weight: 700;
  1983. margin: 10px 0;
  1984. }
  1985. .JKWTree-content {
  1986. flex: 1;
  1987. }
  1988. .groupbox
  1989. {margin:10px;
  1990. width:500px;
  1991. height:500px;
  1992. border:thin solid black;
  1993. padding:10px}
  1994. .grouptitle
  1995. {display:block;
  1996. margin-top:-24px;
  1997. margin-left:20px;
  1998. width:150px;
  1999. text-align:center;
  2000. background-color:white}
  2001. </style>