chejianbaogong.vue 84 KB

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