chejianbaogong.vue 89 KB

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