chejianbaogong.vue 83 KB

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