chejianbaogong.vue 83 KB

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