index.vue 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051
  1. `
  2. <template>
  3. <div style="position: relative">
  4. <div class="headerInfo">
  5. <!-- <div
  6. class="titleText"
  7. style="
  8. width: 300px;
  9. white-space: nowrap;
  10. overflow: hidden;
  11. text-overflow: ellipsis;
  12. "
  13. >
  14. {{ store.processInfo.materialName }} -
  15. {{ store.processInfo.materialModel }}
  16. </div>
  17. <div class="info">
  18. <div class="item">
  19. 当前工序:
  20. {{
  21. store.scanInfo.operationName ? store.scanInfo.operationName : "-"
  22. }}
  23. </div>
  24. <div class="item">
  25. 下一工位:{{
  26. store.scanInfo.nextStation ? store.scanInfo.nextStation : "-"
  27. }}
  28. </div>
  29. <div class="item">
  30. 卡号:{{ store.scanInfo.seqNo ? store.scanInfo.seqNo : "-" }}
  31. </div>
  32. <div class="item">
  33. 编码:{{
  34. store.scanInfo.materialCode ? store.scanInfo.materialCode : "-"
  35. }}
  36. </div>
  37. </div> -->
  38. </div>
  39. <div class="mainContentBox">
  40. <el-row :gutter="20">
  41. <el-col :span="4" class="boxStyle">
  42. <div class="selectOpBox">
  43. <div
  44. style="
  45. font-size: 500;
  46. font-size: 24px;
  47. display: flex;
  48. flex-direction: column;
  49. justify-content: center;
  50. align-items: center;
  51. height: 100%;
  52. color: black;
  53. "
  54. >
  55. 请选择工位
  56. <el-select
  57. v-model="opValue"
  58. class="m-2"
  59. placeholder="请选择工位"
  60. style="width: calc(100% - 40px)"
  61. >
  62. <el-option
  63. v-for="item in options"
  64. :key="item.value"
  65. :label="item.label"
  66. :value="item.value"
  67. />
  68. </el-select>
  69. </div>
  70. </div>
  71. <div class="productInfo" @click="openPop">
  72. <template v-if="taskIndex != null">
  73. <div
  74. class="productitleText"
  75. @click.stop
  76. style="
  77. font-size: 500;
  78. font-size: 24px;
  79. -webkit-line-clamp: 1;
  80. white-space: nowrap;
  81. overflow: hidden;
  82. text-overflow: ellipsis;
  83. "
  84. >
  85. <span @dblclick="fz()">{{
  86. taskArray[taskIndex].orderCode
  87. }}</span>
  88. /
  89. {{ taskArray[taskIndex].planNum }}
  90. </div>
  91. <div
  92. class="productitleText"
  93. style="
  94. color: #000000;
  95. white-space: nowrap;
  96. overflow: hidden;
  97. text-overflow: ellipsis;
  98. -webkit-line-clamp: 2; /* 限制显示的行数 */
  99. "
  100. >
  101. {{ taskArray[taskIndex].materialName }}
  102. </div>
  103. <div style="display: flex">
  104. <div
  105. class="productitleText"
  106. style="
  107. color: #000000;
  108. white-space: nowrap;
  109. overflow: hidden;
  110. text-overflow: ellipsis;
  111. -webkit-line-clamp: 2; /* 限制显示的行数 */
  112. "
  113. >
  114. {{ taskArray[taskIndex].materialModel }}
  115. </div>
  116. </div>
  117. </template>
  118. <template v-else>
  119. <div
  120. class="productitleText"
  121. style="
  122. font-size: 500;
  123. font-size: 24px;
  124. display: flex;
  125. justify-content: center;
  126. align-items: center;
  127. height: 100%;
  128. "
  129. >
  130. 请选择工单
  131. </div>
  132. </template>
  133. </div>
  134. <!-- 侧边栏盒子 -->
  135. <div
  136. class="commonTitle"
  137. style="display: flex; justify-content: space-between; color: black"
  138. >
  139. <div>工序</div>
  140. <el-button
  141. type="primary"
  142. @click="opShowAllStatus = true"
  143. v-if="!opShowAllStatus && opsArray.length > 0"
  144. link
  145. >全部工序</el-button
  146. >
  147. <el-button
  148. type="primary"
  149. @click="opShowAllStatus = false"
  150. v-if="opShowAllStatus && opsArray.length > 0"
  151. link
  152. >关闭</el-button
  153. >
  154. <!-- <div v-if="selectStepIndex !== null">
  155. <el-popconfirm
  156. class="box-item"
  157. title="请确认操作:叫料"
  158. placement="top"
  159. confirm-button-text="确认"
  160. cancel-button-text="取消"
  161. @confirm="toCall"
  162. >
  163. <template #reference>
  164. <el-button type="primary" link>叫料</el-button>
  165. >
  166. </template>
  167. </el-popconfirm>
  168. <el-popconfirm
  169. class="box-item"
  170. title="请确认操作:回库"
  171. placement="top"
  172. confirm-button-text="确认"
  173. cancel-button-text="取消"
  174. @confirm="toBack"
  175. >
  176. <template #reference>
  177. <el-button type="warning" link>回库</el-button>
  178. </template>
  179. </el-popconfirm>
  180. <el-popconfirm
  181. class="box-item"
  182. title="请确认操作:伸出"
  183. placement="top"
  184. confirm-button-text="确认"
  185. cancel-button-text="取消"
  186. @confirm="toExtend"
  187. >
  188. <template #reference>
  189. <el-button type="success" link>伸出</el-button>
  190. </template>
  191. </el-popconfirm>
  192. <el-popconfirm
  193. class="box-item"
  194. title="请确认操作:缩回"
  195. placement="top"
  196. confirm-button-text="确认"
  197. cancel-button-text="取消"
  198. @confirm="toWithdraw"
  199. >
  200. <template #reference>
  201. <el-button type="danger" link>缩回</el-button>
  202. </template>
  203. </el-popconfirm>
  204. </div> -->
  205. </div>
  206. <el-scrollbar
  207. style="height: calc(100vh - 660px); padding-bottom: 20px"
  208. >
  209. <Steps
  210. v-if="opsArray.length > 0"
  211. :opsArray="setOpsArray"
  212. @init="init"
  213. :opShowAllStatus
  214. />
  215. <template v-else>
  216. <div
  217. class="productitleText"
  218. style="
  219. font-size: 500;
  220. font-size: 24px;
  221. display: flex;
  222. height: calc(100vh - 690px);
  223. justify-content: center;
  224. align-items: center;
  225. background-color: #d5dade;
  226. border-radius: 16px;
  227. color: black;
  228. "
  229. >
  230. 暂无工序
  231. </div>
  232. </template>
  233. </el-scrollbar>
  234. <div
  235. style="
  236. width: 100%;
  237. height: 260px;
  238. display: flex;
  239. flex-direction: column;
  240. justify-content: space-evenly;
  241. padding-bottom: 60px;
  242. "
  243. >
  244. <div>
  245. <el-button type="primary" @click="openPop1" style="width: 100%"
  246. >切换产品</el-button
  247. >
  248. </div>
  249. <div style="display: flex">
  250. <el-button type="primary" style="width: 50%">开工</el-button>
  251. <el-button type="primary" @click="openPop2" style="width: 50%"
  252. >报工</el-button
  253. >
  254. </div>
  255. <div style="display: flex">
  256. <el-button
  257. type="primary"
  258. @click="popStatus4 = true"
  259. style="width: 50%"
  260. >条码跟踪</el-button
  261. >
  262. <el-button
  263. type="primary"
  264. @click="popStatus5 = true"
  265. style="width: 50%"
  266. >叫料</el-button
  267. >
  268. </div>
  269. <div style="display: flex">
  270. <el-button
  271. type="primary"
  272. @click="
  273. fileType = 0;
  274. popStatus6 = true;
  275. "
  276. style="width: 50%"
  277. >图纸资料</el-button
  278. >
  279. <el-button
  280. type="primary"
  281. style="width: 50%"
  282. @click="
  283. fileType = 1;
  284. popStatus6 = true;
  285. "
  286. >作业指导书</el-button
  287. >
  288. </div>
  289. <div style="display: flex">
  290. <el-button
  291. type="primary"
  292. @click="popStatus8 = true"
  293. style="width: 50%"
  294. :disabled="true"
  295. >流程单据</el-button
  296. >
  297. <el-button
  298. type="primary"
  299. style="width: 50%"
  300. @click="popStatus7 = true"
  301. >操作</el-button
  302. >
  303. </div>
  304. </div>
  305. </el-col>
  306. <el-col :span="20">
  307. <div class="typeContainer">
  308. <el-scrollbar>
  309. <div style="display: flex">
  310. <div
  311. v-for="(item, index) in defaultComponents"
  312. :key="index"
  313. :class="
  314. componentsDisabled
  315. ? 'scrollbar-demo-item disabled'
  316. : 'scrollbar-demo-item'
  317. "
  318. >
  319. <router-link :to="{ name: item.name }" replace>
  320. <div
  321. :class="getNameClass(index)"
  322. class="typeBox"
  323. @click="setSelectIndex(index)"
  324. >
  325. <div class="svgIcon">
  326. <svg-icon :icon-class="item.iconName" size="30" />
  327. </div>
  328. <div class="name">{{ item.compentName }}</div>
  329. </div>
  330. </router-link>
  331. </div>
  332. </div>
  333. </el-scrollbar>
  334. </div>
  335. <div :key="key" class="routerView" v-if="snVal != null">
  336. <el-scrollbar style="width: 100%">
  337. <router-view v-slot="{ Component, route }">
  338. <keep-alive
  339. include="Dianjian,Jiluxiang,Duomeiticaiji,Esop,Jingu,Mingpaibangding,Shebeijilu,Tiaoshipipei,Wuliaocaiji,Screwdriver"
  340. >
  341. <component :is="Component" :key="route.fullPath" />
  342. </keep-alive>
  343. </router-view>
  344. </el-scrollbar>
  345. </div>
  346. </el-col>
  347. </el-row>
  348. </div>
  349. <!-- 选择工单 -->
  350. <div class="midPopUp" v-if="popStatus" @click.stop="popStatus = false">
  351. <div class="popView">
  352. <div class="hang">
  353. 请扫码:
  354. <ScanCodeInput
  355. style="width: 400px"
  356. v-model="seqVal"
  357. @keyup.enter="console.log(111)"
  358. @click.stop
  359. />
  360. </div>
  361. <el-divider
  362. content-position="center"
  363. style="border-color: black !important"
  364. ><div
  365. style="
  366. width: 100%;
  367. height: 100%;
  368. display: flex;
  369. font-size: 20px;
  370. padding: 0 20px;
  371. font-weight: 500;
  372. color: black;
  373. background-color: #d5dade;
  374. "
  375. >
  376. 选择近期产品
  377. </div></el-divider
  378. >
  379. <el-scrollbar style="height: calc(100vh - 220px)">
  380. <div class="taskBox">
  381. <div
  382. class="productInfo"
  383. :key="item + index"
  384. style="background-color: #ffffff80"
  385. v-for="(item, index) in taskArray"
  386. @click="selectProduct(index)"
  387. >
  388. <div
  389. class="productitleText"
  390. style="font-size: 500; font-size: 24px"
  391. >
  392. {{ item.orderCode }} / {{ item.planNum }}
  393. </div>
  394. <div
  395. class="productitleText"
  396. style="
  397. color: #000000;
  398. white-space: nowrap;
  399. overflow: hidden;
  400. text-overflow: ellipsis;
  401. width: 20vw;
  402. "
  403. >
  404. {{ item.materialName }}
  405. </div>
  406. <div style="display: flex">
  407. <div class="productitleText" style="color: #000000">
  408. &nbsp;{{ item.materialCode }}
  409. </div>
  410. </div>
  411. </div>
  412. </div>
  413. </el-scrollbar>
  414. </div>
  415. </div>
  416. <!-- 切换产品 -->
  417. <div class="midPopUp" v-if="popStatus1" @click.stop="popStatus1 = false">
  418. <div class="popView">
  419. <div class="hang">
  420. 请扫码:
  421. <ScanCodeInput
  422. style="width: 400px"
  423. v-model="seqVal"
  424. @keyup.enter="console.log(111)"
  425. @click.stop
  426. />
  427. </div>
  428. <el-divider
  429. content-position="center"
  430. style="border-color: black !important"
  431. ><div
  432. style="
  433. width: 100%;
  434. height: 100%;
  435. display: flex;
  436. font-size: 20px;
  437. padding: 0 20px;
  438. font-weight: 500;
  439. color: black;
  440. background-color: #d5dade;
  441. "
  442. >
  443. 选择近期产品
  444. </div></el-divider
  445. >
  446. <el-scrollbar style="height: calc(100vh - 220px)">
  447. <div class="taskBox">
  448. <div
  449. class="productInfo"
  450. :key="item + index"
  451. style="background-color: #ffffff80"
  452. v-for="(item, index) in taskArray"
  453. @click="selectProduct(index)"
  454. >
  455. <div
  456. class="productitleText"
  457. style="font-size: 500; font-size: 24px"
  458. >
  459. {{ item.orderCode }} / {{ item.planNum }}
  460. </div>
  461. <div
  462. class="productitleText"
  463. style="
  464. color: #000000;
  465. white-space: nowrap;
  466. overflow: hidden;
  467. text-overflow: ellipsis;
  468. width: 20vw;
  469. "
  470. >
  471. {{ item.materialName }}
  472. </div>
  473. <div style="display: flex">
  474. <div class="productitleText" style="color: #000000">
  475. &nbsp;{{ item.materialCode }}
  476. </div>
  477. </div>
  478. </div>
  479. </div>
  480. </el-scrollbar>
  481. </div>
  482. </div>
  483. <!-- 报工 -->
  484. <div class="midPopUp" v-if="popStatus2" @click.stop="popStatus2 = false">
  485. <div class="popView">
  486. <div
  487. class="hang"
  488. style="
  489. text-align: center;
  490. font-size: 26px;
  491. font-weight: 600;
  492. width: 100%;
  493. "
  494. >
  495. 报工
  496. </div>
  497. <el-divider
  498. content-position="center"
  499. style="border-color: black !important"
  500. ></el-divider>
  501. <el-scrollbar @click.stop style="height: calc(100vh - 260px)">
  502. <el-table
  503. :data="tableData"
  504. border
  505. style="width: 100%; height: calc(100vh - 280px)"
  506. >
  507. <el-table-column prop="user" align="center" label="报工人员">
  508. <template #default="scope">
  509. <div v-if="setStatus || scope.row.addStatus">
  510. <el-select
  511. v-model="tableData[scope.$index].user"
  512. filterable
  513. placeholder="请选择人员"
  514. value-key="id"
  515. style="width: 140px"
  516. >
  517. <el-option
  518. v-for="item in dictStroe.allUsers"
  519. :key="item.id"
  520. :label="item.userName"
  521. :value="item.userName"
  522. />
  523. </el-select>
  524. </div>
  525. <div v-else>{{ scope.row.user }}</div>
  526. </template>
  527. </el-table-column>
  528. <el-table-column prop="num" align="center" label="报工数量">
  529. <template #default="scope">
  530. <div v-if="setStatus || scope.row.addStatus">
  531. <el-input-number
  532. v-model="tableData[scope.$index].num"
  533. controls-position="right"
  534. :step="1"
  535. :min="0"
  536. />
  537. </div>
  538. <div v-else>{{ scope.row.num }}</div>
  539. </template>
  540. </el-table-column>
  541. <el-table-column prop="error" align="center" label="不良品数量">
  542. <template #default="scope">
  543. <div v-if="setStatus || scope.row.addStatus">
  544. <el-input-number
  545. v-model="tableData[scope.$index].error"
  546. controls-position="right"
  547. :step="1"
  548. :min="0"
  549. />
  550. </div>
  551. <div v-else>{{ scope.row.error }}</div>
  552. </template>
  553. </el-table-column>
  554. <el-table-column prop="" label="操作" align="center">
  555. <template #default="scope">
  556. <el-button
  557. type="primary"
  558. style="width: 80px"
  559. v-if="!setStatus && !addStatus"
  560. @click="addRow(scope.$index)"
  561. >新增</el-button
  562. >
  563. <el-button
  564. type="danger"
  565. style="width: 80px"
  566. @click="deleteRow(scope.$index)"
  567. >删除</el-button
  568. >
  569. </template>
  570. </el-table-column>
  571. </el-table>
  572. </el-scrollbar>
  573. <div class="btns" @click.stop style="margin-top: 10px">
  574. <el-button
  575. type="primary"
  576. @click="cancel"
  577. style="width: 80px; float: right"
  578. >取消</el-button
  579. >
  580. <el-button
  581. type="danger"
  582. v-if="addStatus"
  583. style="width: 80px; float: right; margin-right: 10px !important"
  584. >报工</el-button
  585. >
  586. <el-button
  587. type="warning"
  588. @click="toChange"
  589. style="width: 80px; float: right; margin-right: 10px !important"
  590. v-if="!setStatus && !addStatus"
  591. >变更</el-button
  592. >
  593. <el-button
  594. type="warning"
  595. @click="toSubmit"
  596. style="width: 80px; float: right; margin-right: 10px !important"
  597. v-if="setStatus"
  598. >确认</el-button
  599. >
  600. </div>
  601. </div>
  602. </div>
  603. <!-- 密码 -->
  604. <div
  605. class="midPopUp"
  606. style="z-index: 999999999"
  607. v-if="popStatus3"
  608. @click.stop="popStatus3 = false"
  609. >
  610. <div class="popView" @click.stop style="height: 160px; width: 400px">
  611. <div
  612. class="hang"
  613. style="
  614. text-align: center;
  615. font-size: 26px;
  616. font-weight: 600;
  617. width: 100%;
  618. "
  619. >
  620. 请输入产线线长密码
  621. </div>
  622. <div>
  623. <el-input
  624. v-model="password"
  625. type="password"
  626. placeholder="请输入密码"
  627. style="width: 350px"
  628. />
  629. </div>
  630. <div class="btns" @click.stop style="margin-top: 10px">
  631. <el-button
  632. type="warning"
  633. @click="
  634. password = '';
  635. popStatus3 = false;
  636. "
  637. style="width: 80px; float: right; margin-right: 10px !important"
  638. v-if="setStatus"
  639. >关闭</el-button
  640. >
  641. <el-button
  642. type="primary"
  643. @click="submit"
  644. style="width: 80px; float: right; margin-right: 10px !important"
  645. v-if="setStatus"
  646. >确认</el-button
  647. >
  648. </div>
  649. </div>
  650. </div>
  651. <!-- 条码跟踪 -->
  652. <div class="midPopUp" v-if="popStatus4" @click.stop="popStatus4 = false">
  653. <div class="popView">
  654. <div
  655. class="hang"
  656. style="
  657. text-align: center;
  658. font-size: 26px;
  659. font-weight: 600;
  660. width: 100%;
  661. "
  662. >
  663. 条码跟踪
  664. </div>
  665. <el-divider
  666. content-position="center"
  667. style="border-color: black !important"
  668. ></el-divider>
  669. <el-scrollbar @click.stop style="height: calc(100vh - 260px)">
  670. <el-table
  671. :data="tableData1"
  672. border
  673. style="width: 100%; height: calc(100vh - 280px)"
  674. >
  675. <el-table-column prop="user" align="center" label="流水号">
  676. <template #default="scope">
  677. <div>{{ scope.row.num1 }}</div>
  678. </template>
  679. </el-table-column>
  680. <el-table-column prop="num" align="center" label="序列号">
  681. <template #default="scope">
  682. <div>
  683. <el-input
  684. v-model="tableData[scope.$index].num2"
  685. placeholder="请输入序列号"
  686. />
  687. </div>
  688. </template>
  689. </el-table-column>
  690. <el-table-column prop="error" align="center" label="铭牌编号">
  691. <template #default="scope">
  692. <div>
  693. <el-input
  694. v-model="tableData[scope.$index].num3"
  695. placeholder="请输入铭牌编号"
  696. />
  697. </div>
  698. </template>
  699. </el-table-column>
  700. </el-table>
  701. </el-scrollbar>
  702. <div class="btns" @click.stop style="margin-top: 10px">
  703. <el-button
  704. type="primary"
  705. @click="popStatus4 = false"
  706. style="width: 80px; float: right"
  707. >取消</el-button
  708. >
  709. <el-button
  710. type="warning"
  711. @click="popStatus4 = false"
  712. style="width: 80px; float: right; margin-right: 10px !important"
  713. >确认</el-button
  714. >
  715. </div>
  716. </div>
  717. </div>
  718. <!-- 叫料 -->
  719. <div
  720. class="midPopUp"
  721. v-if="popStatus5"
  722. @click.stop="
  723. popStatus5 = false;
  724. callMaterials = null;
  725. selectIndexData3 = null;
  726. "
  727. >
  728. <div
  729. class="popView"
  730. v-if="callMaterials == null"
  731. @click.stop
  732. style="height: 240px; width: 440px"
  733. >
  734. <div
  735. class="hang"
  736. style="
  737. text-align: center;
  738. font-size: 26px;
  739. font-weight: 600;
  740. margin-bottom: 20px;
  741. width: 100%;
  742. "
  743. >
  744. 请选择叫料方式
  745. </div>
  746. <div style="display: flex; justify-content: space-around">
  747. <el-button
  748. type="primary"
  749. @click="callMaterials = 0"
  750. style="
  751. width: 140px;
  752. height: 140px;
  753. font-size: 20px;
  754. border-radius: 16px;
  755. "
  756. >零星叫料</el-button
  757. >
  758. <el-button
  759. type="success"
  760. @click="callMaterials = 1"
  761. style="
  762. width: 140px;
  763. height: 140px;
  764. font-size: 20px;
  765. border-radius: 16px;
  766. "
  767. >齐套叫料</el-button
  768. >
  769. </div>
  770. </div>
  771. <div class="popView" v-if="callMaterials == 0">
  772. <div
  773. class="hang"
  774. style="
  775. text-align: center;
  776. font-size: 26px;
  777. font-weight: 600;
  778. width: 100%;
  779. "
  780. >
  781. 零星叫料
  782. </div>
  783. <div @click.stop style="width: 400px; display: flex">
  784. <div
  785. style="
  786. text-align: center;
  787. font-size: 20px;
  788. font-weight: 600;
  789. width: 140px;
  790. "
  791. >
  792. 物料查询:
  793. </div>
  794. <el-input v-model="callMaterialsNum1" placeholder="请输入铭牌编号" />
  795. </div>
  796. <el-divider
  797. content-position="center"
  798. style="border-color: black !important"
  799. ></el-divider>
  800. <el-scrollbar @click.stop style="height: calc(100vh - 260px)">
  801. <el-table :data="tableData2" border style="width: 100%">
  802. <el-table-column prop="name" align="center" label="物料名称">
  803. <template #default="scope">
  804. <div>{{ scope.row.name }}</div>
  805. </template>
  806. </el-table-column>
  807. <el-table-column prop="model" align="center" label="物料规格">
  808. <template #default="scope">
  809. <div>{{ scope.row.model }}</div>
  810. </template>
  811. </el-table-column>
  812. <el-table-column prop="unit" align="center" label="单位">
  813. <template #default="scope">
  814. <div>{{ scope.row.unit }}</div>
  815. </template>
  816. </el-table-column>
  817. <el-table-column prop="error" align="center" label="数量">
  818. <template #default="scope">
  819. <div>
  820. <el-input-number
  821. v-model="tableData2[scope.$index].num"
  822. controls-position="right"
  823. :step="1"
  824. :min="0"
  825. />
  826. </div>
  827. </template>
  828. </el-table-column>
  829. </el-table>
  830. <div class="btns" @click.stop style="margin-top: 10px">
  831. <el-button
  832. type="warning"
  833. style="width: 80px; float: right; margin-right: 10px !important"
  834. >确认</el-button
  835. >
  836. </div>
  837. <div
  838. style="
  839. text-align: center;
  840. font-size: 20px;
  841. font-weight: 600;
  842. width: 140px;
  843. margin: 20px 0;
  844. "
  845. >
  846. 已选择清单:
  847. </div>
  848. <el-table :data="tableData2" border style="width: 100%">
  849. <el-table-column prop="name" align="center" label="物料名称">
  850. <template #default="scope">
  851. <div>{{ scope.row.name }}</div>
  852. </template>
  853. </el-table-column>
  854. <el-table-column prop="model" align="center" label="物料规格">
  855. <template #default="scope">
  856. <div>{{ scope.row.model }}</div>
  857. </template>
  858. </el-table-column>
  859. <el-table-column prop="unit" align="center" label="单位">
  860. <template #default="scope">
  861. <div>{{ scope.row.unit }}</div>
  862. </template>
  863. </el-table-column>
  864. <el-table-column prop="error" align="center" label="数量">
  865. <template #default="scope">
  866. <div>
  867. <el-input-number
  868. v-model="tableData2[scope.$index].num"
  869. controls-position="right"
  870. :step="1"
  871. :min="0"
  872. />
  873. </div>
  874. </template>
  875. </el-table-column>
  876. </el-table>
  877. </el-scrollbar>
  878. <div class="btns" @click.stop style="margin-top: 10px">
  879. <el-button
  880. type="primary"
  881. @click="
  882. popStatus5 = false;
  883. callMaterials = null;
  884. "
  885. style="width: 80px; float: right; margin-right: 10px !important"
  886. >取消</el-button
  887. >
  888. <el-button
  889. type="success"
  890. style="width: 80px; float: right; margin-right: 10px !important"
  891. @click="toCall"
  892. >提交</el-button
  893. >
  894. </div>
  895. </div>
  896. <div class="popView" v-if="callMaterials == 1">
  897. <div
  898. class="hang"
  899. style="
  900. text-align: center;
  901. font-size: 26px;
  902. font-weight: 600;
  903. width: 100%;
  904. "
  905. >
  906. 齐套物料
  907. </div>
  908. <el-divider
  909. content-position="center"
  910. style="border-color: black !important"
  911. ></el-divider>
  912. <el-scrollbar @click.stop style="height: calc(100vh - 260px)">
  913. <div
  914. style="
  915. width: 100%;
  916. display: grid;
  917. gap: 20px;
  918. padding: 20px;
  919. grid-template-columns: repeat(3, 1fr);
  920. "
  921. >
  922. <div
  923. :class="
  924. index == selectIndexData3
  925. ? 'selcetedMaterialInfoBox materialInfoBox'
  926. : 'materialInfoBox'
  927. "
  928. @click="selectIndexData3 = index"
  929. v-for="(item, index) in tableData3"
  930. >
  931. <div class="productitleText">料箱: {{ item.boxCode }}</div>
  932. <div class="productitleText">物料数量:{{ item.num }}</div>
  933. <div class="productitleText">
  934. 工单编号:{{ item.workOrderCode }}
  935. </div>
  936. <div class="productitleText">工序: {{ item.opName }}</div>
  937. </div>
  938. </div>
  939. </el-scrollbar>
  940. <div class="btns" @click.stop style="margin-top: 10px">
  941. <el-button
  942. type="primary"
  943. @click="
  944. popStatus5 = false;
  945. callMaterials = null;
  946. selectIndexData3 = null;
  947. "
  948. style="width: 80px; float: right"
  949. >取消</el-button
  950. >
  951. <el-button
  952. type="success"
  953. style="width: 80px; float: right; margin-right: 10px !important"
  954. :disabled="selectIndexData3 == null"
  955. @click="toCall(tableData3[selectIndexData3].boxCode)"
  956. >配送</el-button
  957. >
  958. </div>
  959. </div>
  960. </div>
  961. <!-- 图纸资料、作业指导书 -->
  962. <div
  963. class="midPopUp"
  964. v-if="popStatus6"
  965. @click.stop="
  966. popStatus6 = false;
  967. fileType = null;
  968. selectIndexData4 = null;
  969. "
  970. >
  971. <div class="popView">
  972. <div
  973. class="hang"
  974. style="
  975. text-align: center;
  976. font-size: 26px;
  977. font-weight: 600;
  978. width: 100%;
  979. "
  980. >
  981. {{ fileType == 0 ? "图纸资料" : "作业指导书" }}
  982. </div>
  983. <el-divider
  984. content-position="center"
  985. style="border-color: black !important"
  986. ></el-divider>
  987. <el-scrollbar @click.stop style="height: calc(100vh - 260px)">
  988. <div
  989. style="
  990. width: 100%;
  991. display: grid;
  992. gap: 20px;
  993. padding: 20px;
  994. grid-template-columns: repeat(3, 1fr);
  995. "
  996. >
  997. <div
  998. :class="
  999. index == selectIndexData4
  1000. ? 'selcetedMaterialInfoBox materialInfoBox'
  1001. : 'materialInfoBox'
  1002. "
  1003. @click="selectIndexData4 = index"
  1004. v-for="(item, index) in tableData4"
  1005. >
  1006. <div class="productitleText">文件名称: {{ item.name }}</div>
  1007. <div class="productitleText">文件编号:{{ item.code }}</div>
  1008. <div class="productitleText">版本号:{{ item.banbenhao }}</div>
  1009. <div class="productitleText">
  1010. 上传时间: {{ item.onloadDate }}
  1011. </div>
  1012. <div class="productitleText">编辑人员: {{ item.user }}</div>
  1013. </div>
  1014. </div>
  1015. </el-scrollbar>
  1016. <div class="btns" @click.stop style="margin-top: 10px">
  1017. <el-button
  1018. type="primary"
  1019. @click="
  1020. popStatus6 = false;
  1021. fileType = null;
  1022. selectIndexData4 = null;
  1023. "
  1024. style="width: 80px; float: right"
  1025. >取消</el-button
  1026. >
  1027. <!-- <el-button
  1028. type="success"
  1029. style="width: 80px; float: right; margin-right: 10px !important"
  1030. @click="PDFShow = true"
  1031. :disabled="selectIndexData4 == null"
  1032. >
  1033. 打开
  1034. </el-button> -->
  1035. <div style="float: right; margin-right: 10px">
  1036. <PDFViewFull
  1037. btnText="打开"
  1038. :need-to-show-pdf="selectIndexData4 != null"
  1039. content-type="button"
  1040. :is-link="false"
  1041. pdf-source="http://192.168.1.3:20001/jgfile//2025/4/11/447488548627850.pdf"
  1042. />
  1043. </div>
  1044. </div>
  1045. </div>
  1046. </div>
  1047. <!-- 操作 -->
  1048. <div class="midPopUp" v-if="popStatus7" @click.stop="popStatus7 = false">
  1049. <div class="popView" @click.stop style="height: 300px; width: 680px">
  1050. <div
  1051. class="hang"
  1052. style="
  1053. text-align: center;
  1054. font-size: 26px;
  1055. font-weight: 600;
  1056. margin-bottom: 20px;
  1057. width: 100%;
  1058. "
  1059. >
  1060. 请操作内容
  1061. </div>
  1062. <div style="display: flex; justify-content: space-around">
  1063. <!-- <el-popconfirm
  1064. class="box-item"
  1065. title="请确认操作:叫料"
  1066. placement="top"
  1067. confirm-button-text="确认"
  1068. cancel-button-text="取消"
  1069. @confirm="toCall"
  1070. >
  1071. <template #reference>
  1072. <el-button
  1073. type="primary"
  1074. style="
  1075. width: 140px;
  1076. height: 140px;
  1077. font-size: 20px;
  1078. border-radius: 16px;
  1079. "
  1080. >叫料</el-button
  1081. >
  1082. >
  1083. </template>
  1084. </el-popconfirm> -->
  1085. <div>
  1086. <el-popconfirm
  1087. class="box-item"
  1088. title="请确认操作:回库"
  1089. placement="top"
  1090. confirm-button-text="确认"
  1091. cancel-button-text="取消"
  1092. @confirm="toBack"
  1093. >
  1094. <template #reference>
  1095. <div style="display: flex; flex-direction: column">
  1096. <el-button
  1097. type="warning"
  1098. style="
  1099. width: 140px;
  1100. height: 140px;
  1101. font-size: 20px;
  1102. border-radius: 16px;
  1103. "
  1104. >回库</el-button
  1105. >
  1106. </div>
  1107. </template>
  1108. </el-popconfirm>
  1109. <el-input v-model="boxNo" style="width: 140px; margin-top: 10px" />
  1110. </div>
  1111. <el-popconfirm
  1112. class="box-item"
  1113. title="请确认操作:伸出"
  1114. placement="top"
  1115. confirm-button-text="确认"
  1116. cancel-button-text="取消"
  1117. @confirm="toExtend"
  1118. >
  1119. <template #reference>
  1120. <el-button
  1121. type="warning"
  1122. style="
  1123. width: 140px;
  1124. height: 140px;
  1125. font-size: 20px;
  1126. border-radius: 16px;
  1127. "
  1128. >伸出</el-button
  1129. >
  1130. </template>
  1131. </el-popconfirm>
  1132. <el-popconfirm
  1133. class="box-item"
  1134. title="请确认操作:缩回"
  1135. placement="top"
  1136. confirm-button-text="确认"
  1137. cancel-button-text="取消"
  1138. @confirm="toWithdraw"
  1139. >
  1140. <template #reference>
  1141. <el-button
  1142. type="warning"
  1143. style="
  1144. width: 140px;
  1145. height: 140px;
  1146. font-size: 20px;
  1147. border-radius: 16px;
  1148. "
  1149. >缩回</el-button
  1150. >
  1151. </template>
  1152. </el-popconfirm>
  1153. </div>
  1154. </div>
  1155. </div>
  1156. <!-- 流程单据 -->
  1157. <div class="midPopUp" v-if="popStatus8" @click.stop="popStatus8 = false">
  1158. <div class="popView">
  1159. <div
  1160. class="hang"
  1161. style="
  1162. text-align: center;
  1163. font-size: 26px;
  1164. font-weight: 600;
  1165. width: 100%;
  1166. display: flex;
  1167. justify-content: space-between;
  1168. "
  1169. >
  1170. <div>流程模板</div>
  1171. <el-button
  1172. type="primary"
  1173. style="width: 80px; float: right; margin-right: 10px !important"
  1174. @click="toCreateTemplate"
  1175. >
  1176. 新建
  1177. </el-button>
  1178. </div>
  1179. <el-divider
  1180. content-position="center"
  1181. style="border-color: black !important"
  1182. ></el-divider>
  1183. <el-scrollbar @click.stop style="height: calc(100vh - 260px)">
  1184. <div
  1185. style="
  1186. width: 100%;
  1187. display: grid;
  1188. gap: 20px;
  1189. padding: 20px;
  1190. grid-template-columns: repeat(3, 1fr);
  1191. "
  1192. >
  1193. <div
  1194. :class="
  1195. index == selectIndexData5 && templateType == 1
  1196. ? 'selcetedMaterialInfoBoxTemplate materialInfoBoxTemplate'
  1197. : 'materialInfoBoxTemplate'
  1198. "
  1199. @click="
  1200. templateType = 1;
  1201. selectIndexData5 = index;
  1202. "
  1203. v-for="(item, index) in tableData5"
  1204. >
  1205. <div class="productitleText">模板名称: {{ item.name }}</div>
  1206. <div class="productitleText">创建时间:{{ item.date }}</div>
  1207. <div class="productitleText">创建人员:{{ item.user }}</div>
  1208. </div>
  1209. </div>
  1210. </el-scrollbar>
  1211. <div
  1212. class="hang"
  1213. style="
  1214. text-align: center;
  1215. font-size: 26px;
  1216. font-weight: 600;
  1217. width: 100%;
  1218. display: flex;
  1219. justify-content: space-between;
  1220. "
  1221. >
  1222. <div>待处理流程</div>
  1223. <el-button
  1224. type="primary"
  1225. style="width: 80px; float: right; margin-right: 10px !important"
  1226. @click="toCreateTemplate"
  1227. >
  1228. 打开
  1229. </el-button>
  1230. </div>
  1231. <el-divider
  1232. content-position="center"
  1233. style="border-color: black !important"
  1234. ></el-divider>
  1235. <el-scrollbar @click.stop style="height: calc(100vh - 260px)">
  1236. <div
  1237. style="
  1238. width: 100%;
  1239. display: grid;
  1240. gap: 20px;
  1241. padding: 20px;
  1242. grid-template-columns: repeat(3, 1fr);
  1243. "
  1244. >
  1245. <div
  1246. :class="
  1247. index == selectIndexData5 && templateType == 2
  1248. ? 'selcetedMaterialInfoBox materialInfoBox'
  1249. : 'materialInfoBox'
  1250. "
  1251. @click="
  1252. templateType = 2;
  1253. selectIndexData5 = index;
  1254. "
  1255. v-for="(item, index) in tableData5"
  1256. >
  1257. <div class="productitleText">模板名称: {{ item.name }}</div>
  1258. <div class="productitleText">创建时间:{{ item.date }}</div>
  1259. <div class="productitleText">创建人员:{{ item.user }}</div>
  1260. <div class="productitleText">当前阶段:{{ item.stage }}</div>
  1261. </div>
  1262. </div>
  1263. </el-scrollbar>
  1264. <!-- <div class="btns" @click.stop style="margin-top: 10px">
  1265. <el-button
  1266. type="primary"
  1267. @click="
  1268. popStatus6 = false;
  1269. fileType = null;
  1270. selectIndexData4 = null;
  1271. "
  1272. style="width: 80px; float: right"
  1273. >取消</el-button
  1274. >
  1275. <el-button
  1276. type="success"
  1277. style="width: 80px; float: right; margin-right: 10px !important"
  1278. @click="toTemplate"
  1279. :disabled="selectIndexData5 == null"
  1280. >
  1281. 打开
  1282. </el-button>
  1283. </div> -->
  1284. </div>
  1285. </div>
  1286. </div>
  1287. </template>
  1288. <script setup>
  1289. import OperationBar from "@/views/pro-steps/operationBar.vue";
  1290. import ScanCodeInput from "@/components/ScanCodeInput/index.vue";
  1291. import Steps from "@/views/process/components/steps.vue";
  1292. import { useProcessStore } from "@/store";
  1293. import { useDictionaryStore } from "@/store/modules/dictionary";
  1294. import { getOpCompent } from "@/api/prosteps";
  1295. import { getOrders } from "@/api/process";
  1296. import { getScan } from "@/api/process";
  1297. import { carCall, carBack, carExtend } from "@/api/process";
  1298. import PDFViewFull from "@/components/PDFViewFull/index.vue";
  1299. defineOptions({
  1300. name: "ProSteps",
  1301. });
  1302. const boxNo = ref(null);
  1303. const PDFShow = ref(false);
  1304. const baseUrl = import.meta.env.VITE_APP_UPLOAD_URL;
  1305. const cancel = () => {
  1306. if (addStatus.value) {
  1307. tableData.value.forEach((item, index) => {
  1308. if (item.addStatus == true) {
  1309. deleteRow(index);
  1310. }
  1311. });
  1312. addStatus.value = false;
  1313. } else if (setStatus.value) {
  1314. setStatus.value = false;
  1315. } else {
  1316. popStatus2.value = false;
  1317. }
  1318. };
  1319. //报工变更提交前产线线长密码
  1320. const password = ref("");
  1321. const toSubmit = () => {
  1322. popStatus3.value = true;
  1323. };
  1324. const ROWMODEL = {
  1325. user: "",
  1326. num: 0,
  1327. error: 0,
  1328. addStatus: true,
  1329. };
  1330. const submit = () => {
  1331. ElMessage.success("操作成功!");
  1332. password.value = "";
  1333. popStatus3.value = false;
  1334. };
  1335. const addRow = (index) => {
  1336. addStatus.value = true;
  1337. tableData.value.splice(index + 1, 0, ROWMODEL);
  1338. };
  1339. const deleteRow = (index) => {
  1340. tableData.value.splice(index, 1);
  1341. };
  1342. const dictStroe = useDictionaryStore();
  1343. const addStatus = ref(false);
  1344. //报工数据编辑状态
  1345. const setStatus = ref(false);
  1346. const toChange = () => {
  1347. setStatus.value = true;
  1348. };
  1349. const tableData = ref([
  1350. {
  1351. user: "admin",
  1352. num: 12,
  1353. error: 0,
  1354. },
  1355. {
  1356. user: "admin",
  1357. num: 18,
  1358. error: 0,
  1359. },
  1360. {
  1361. user: "admin",
  1362. num: 12,
  1363. error: 0,
  1364. },
  1365. {
  1366. user: "admin",
  1367. num: 18,
  1368. error: 1,
  1369. },
  1370. ]);
  1371. const tableData1 = ref([
  1372. {
  1373. num1: "10021.123.34",
  1374. num2: "",
  1375. num3: "",
  1376. },
  1377. {
  1378. num1: "10021.123.54",
  1379. num2: "",
  1380. num3: "",
  1381. },
  1382. {
  1383. num1: "10021.123.40",
  1384. num2: "",
  1385. num3: "",
  1386. },
  1387. ]);
  1388. const tableData2 = ref([
  1389. {
  1390. name: "酒精",
  1391. model: "xxx",
  1392. unit: "ml",
  1393. num: 0,
  1394. },
  1395. {
  1396. name: "锡焊",
  1397. model: "tttt",
  1398. unit: "卷",
  1399. num: 0,
  1400. },
  1401. ]);
  1402. const tableData3 = ref([
  1403. {
  1404. boxCode: "LX-00003",
  1405. num: 12,
  1406. workOrderCode: "2025.12.125",
  1407. opName: "装配",
  1408. },
  1409. {
  1410. boxCode: "LX-00004",
  1411. num: 12,
  1412. workOrderCode: "2025.12.125",
  1413. opName: "调试",
  1414. },
  1415. {
  1416. boxCode: "LX-00002",
  1417. num: 12,
  1418. workOrderCode: "2025.12.125",
  1419. opName: "装配",
  1420. },
  1421. {
  1422. boxCode: "LX-00007",
  1423. num: 12,
  1424. workOrderCode: "2025.12.125",
  1425. opName: "装配",
  1426. },
  1427. {
  1428. boxCode: "LX-00005",
  1429. num: 12,
  1430. workOrderCode: "2025.12.125",
  1431. opName: "装配",
  1432. },
  1433. {
  1434. boxCode: "LX-00006",
  1435. num: 12,
  1436. workOrderCode: "2025.12.125",
  1437. opName: "装配",
  1438. },
  1439. {
  1440. boxCode: "LX-00010",
  1441. num: 12,
  1442. workOrderCode: "2025.12.125",
  1443. opName: "装配",
  1444. },
  1445. ]);
  1446. const selectIndexData4 = ref(null);
  1447. const tableData4 = ref([
  1448. {
  1449. name: "LX-000123",
  1450. code: "NO.12321321",
  1451. banbenhao: "2025.12.125",
  1452. onloadDate: "2025/04/28 12:21:32",
  1453. user: "admin",
  1454. },
  1455. {
  1456. name: "LX-000123",
  1457. code: "NO.12321321",
  1458. banbenhao: "2025.12.125",
  1459. onloadDate: "2025/04/28 12:21:32",
  1460. user: "admin",
  1461. },
  1462. {
  1463. name: "LX-000123",
  1464. code: "NO.12321321",
  1465. banbenhao: "2025.12.125",
  1466. onloadDate: "2025/04/28 12:21:32",
  1467. user: "admin",
  1468. },
  1469. {
  1470. name: "LX-000123",
  1471. code: "NO.12321321",
  1472. banbenhao: "2025.12.125",
  1473. onloadDate: "2025/04/28 12:21:32",
  1474. user: "admin",
  1475. },
  1476. ]);
  1477. const selectIndexData3 = ref(null);
  1478. //流程模板
  1479. const templateType = ref(null);
  1480. const selectIndexData5 = ref(null);
  1481. const tableData5 = ref([
  1482. {
  1483. name: "委外",
  1484. date: "2025-05-06 12:21:32",
  1485. user: "admin",
  1486. stage: "A阶段",
  1487. },
  1488. {
  1489. name: "测试",
  1490. date: "2025-05-06 12:21:32",
  1491. user: "admin",
  1492. stage: "C阶段",
  1493. },
  1494. {
  1495. name: "返工",
  1496. date: "2025-05-06 12:21:32",
  1497. user: "admin",
  1498. stage: "D阶段",
  1499. },
  1500. {
  1501. name: "报故",
  1502. date: "2025-05-06 12:21:32",
  1503. user: "admin",
  1504. stage: "E阶段",
  1505. },
  1506. {
  1507. name: "检验",
  1508. date: "2025-05-06 12:21:32",
  1509. user: "admin",
  1510. stage: "F阶段",
  1511. },
  1512. ]);
  1513. const toTemplate = () => {};
  1514. //true为展示所有
  1515. const opShowAllStatus = ref(false);
  1516. const opValue = ref("1");
  1517. const options = [
  1518. {
  1519. value: "1",
  1520. label: "装配",
  1521. },
  1522. {
  1523. value: "2",
  1524. label: "调试",
  1525. },
  1526. {
  1527. value: "3",
  1528. label: "测试",
  1529. },
  1530. ];
  1531. const copyTextUsingTextarea = (text) => {
  1532. let textArea = document.createElement("textarea");
  1533. textArea.value = text;
  1534. textArea.style.position = "absolute";
  1535. textArea.style.opacity = "0";
  1536. textArea.style.left = "-9999px";
  1537. textArea.style.top = "-9999px";
  1538. document.body.appendChild(textArea);
  1539. textArea.focus();
  1540. textArea.select();
  1541. try {
  1542. const result = document.execCommand("copy");
  1543. showCopyMessage(result);
  1544. } catch (err) {
  1545. showCopyMessage(false);
  1546. }
  1547. textArea.remove();
  1548. };
  1549. const showCopyMessage = (success) => {
  1550. if (success) {
  1551. ElMessage({
  1552. type: "success",
  1553. message: "复制成功!",
  1554. });
  1555. } else {
  1556. ElMessage({
  1557. type: "error",
  1558. message: "复制失败!",
  1559. });
  1560. }
  1561. };
  1562. const fz = () => {
  1563. const text = taskArray.value[taskIndex.value].workOrderCode;
  1564. copyTextUsingTextarea(text);
  1565. };
  1566. const toCall = async (no) => {
  1567. boxNo.value = no;
  1568. await carCall({ boxNo: boxNo.value });
  1569. ElMessage.success("呼叫成功,请等待");
  1570. popStatus6.value = false;
  1571. };
  1572. const toBack = async () => {
  1573. await carBack({ boxNo: boxNo.value });
  1574. ElMessage.success("操作成功,请等待");
  1575. popStatus6.value = false;
  1576. };
  1577. const toExtend = async () => {
  1578. await carExtend({
  1579. drawerStatus: 0,
  1580. });
  1581. ElMessage.success("操作成功,请等待");
  1582. popStatus6.value = false;
  1583. };
  1584. const toWithdraw = async () => {
  1585. await carExtend({
  1586. drawerStatus: 1,
  1587. });
  1588. ElMessage.success("操作成功,请等待");
  1589. popStatus6.value = false;
  1590. };
  1591. const popStatus = ref(null);
  1592. const popStatus1 = ref(null);
  1593. const popStatus2 = ref(null);
  1594. const popStatus3 = ref(null);
  1595. const popStatus4 = ref(null);
  1596. //叫料 0零星叫料 1齐套叫料
  1597. const callMaterials = ref(null);
  1598. const popStatus5 = ref(null);
  1599. const popStatus6 = ref(null);
  1600. //文件类型 0图纸资料 1作业指导书
  1601. const fileType = ref(null);
  1602. const popStatus7 = ref(null);
  1603. // 单据
  1604. const popStatus8 = ref(null);
  1605. const callMaterialsNum1 = ref("");
  1606. const callMaterialsNum2 = ref("");
  1607. const openPop = async () => {
  1608. await getTaskArray();
  1609. popStatus.value = true;
  1610. };
  1611. const openPop1 = async () => {
  1612. await getTaskArray();
  1613. popStatus1.value = true;
  1614. };
  1615. const openPop2 = async () => {
  1616. popStatus2.value = true;
  1617. };
  1618. const seqVal = ref("");
  1619. const snVal = ref(null);
  1620. const selectProduct = async (index) => {
  1621. taskIndex.value = index;
  1622. selectIndex.value = 0;
  1623. //设置数据
  1624. store.odersData.workOrderCode =
  1625. taskArray.value[taskIndex.value].workOrderCode;
  1626. store.processInfo.materialName =
  1627. taskArray.value[taskIndex.value].materialName;
  1628. store.processInfo.materialModel =
  1629. taskArray.value[taskIndex.value].materialModel;
  1630. if (taskArray.value[taskIndex.value].ops.length > 0) {
  1631. opsArray.value = taskArray.value[taskIndex.value].ops;
  1632. selectStepIndex.value = 0;
  1633. snVal.value =
  1634. taskArray.value[taskIndex.value].ops[selectStepIndex.value].seqs.length >
  1635. 0
  1636. ? taskArray.value[taskIndex.value].ops[selectStepIndex.value].seqs[0]
  1637. .seqNo
  1638. : null;
  1639. } else {
  1640. selectStepIndex.value = null;
  1641. ElMessage.warning("暂无操作步骤");
  1642. }
  1643. if (snVal.value != null) {
  1644. await init(0);
  1645. } else {
  1646. ElMessage.warning("当前工序暂不可操作");
  1647. }
  1648. popStatus.value = false;
  1649. };
  1650. const store = useProcessStore();
  1651. store.odersData.productLineId = 10;
  1652. const taskArray = ref([]);
  1653. const taskIndex = ref(null);
  1654. const getScanData = async () => {
  1655. const value = snVal.value;
  1656. const res = await getScan({
  1657. operationId: Number(
  1658. taskArray.value[taskIndex.value].ops[selectStepIndex.value].operationId
  1659. ),
  1660. qrCode: value,
  1661. workOrderCode: taskArray.value[taskIndex.value].workOrderCode,
  1662. //stationId暂时随便传一个
  1663. stationId: 1,
  1664. });
  1665. if (res) {
  1666. const { code, data, msg } = res;
  1667. if (code == "200") {
  1668. store.scanInfo = data;
  1669. store.useSeqNo = data.seqNo;
  1670. }
  1671. return true;
  1672. } else {
  1673. snVal.value = null;
  1674. stepComponents.value = [];
  1675. router.replace({ name: "ProSteps" });
  1676. return false;
  1677. }
  1678. };
  1679. const getTaskArray = async () => {
  1680. const { data } = await getOrders({
  1681. pageNo: 1,
  1682. pageSize: 999999999,
  1683. queryComplete: 0,
  1684. });
  1685. taskArray.value = data.records;
  1686. };
  1687. const opsArray = ref([]);
  1688. const setOpsArray = computed(() => {
  1689. const array = JSON.parse(JSON.stringify(opsArray.value));
  1690. array.forEach((item, index) => {
  1691. if (index < 3) {
  1692. item.isOp = false;
  1693. } else {
  1694. item.isOp = true;
  1695. }
  1696. });
  1697. return array;
  1698. });
  1699. const selectStepIndex = ref(null);
  1700. provide("selectStepIndex", selectStepIndex);
  1701. const key = ref(false);
  1702. const route = useRoute();
  1703. const router = useRouter();
  1704. const instance = getCurrentInstance();
  1705. const loading = ref(false);
  1706. const recondOPId = ref(null);
  1707. const qrCode = ref(null);
  1708. //配置标签信息Data
  1709. const stepComponents = ref([]);
  1710. const defaultComponents = [
  1711. {
  1712. compentName: "ESOP",
  1713. iconName: "ESOP",
  1714. path: "esop",
  1715. name: "Esop",
  1716. },
  1717. {
  1718. compentName: "物料采集",
  1719. iconName: "wuliaocaiji",
  1720. path: "wuliaocaiji",
  1721. name: "Wuliaocaiji",
  1722. },
  1723. {
  1724. compentName: "图像采集",
  1725. iconName: "duomeiticaiji",
  1726. path: "duomeiticaiji",
  1727. name: "Duomeiticaiji",
  1728. },
  1729. {
  1730. compentName: "工序表单",
  1731. iconName: "mingpai",
  1732. path: "execl",
  1733. name: "Excel",
  1734. },
  1735. // {
  1736. // compentName: "设备确认",
  1737. // iconName: "shebeijilu",
  1738. // path: "shebeijilu",
  1739. // name: "Shebeijilu",
  1740. // },
  1741. {
  1742. compentName: "设备点检",
  1743. iconName: "dianjian",
  1744. path: "dianjian",
  1745. name: "Dianjian",
  1746. },
  1747. ];
  1748. //当前路由在setpComponents中的index
  1749. const selectIndex = ref(null);
  1750. const componentsDisabled = ref(true);
  1751. //配置data固定路由参数等
  1752. const setStepComponents = (data) => {
  1753. let resData = [];
  1754. data.forEach((item) => {
  1755. defaultComponents.forEach((obj) => {
  1756. if (item.compentName === obj.compentName) {
  1757. resData.push({ ...item, ...obj });
  1758. }
  1759. });
  1760. });
  1761. return resData;
  1762. };
  1763. const getNameClass = (index) => {
  1764. return index === selectIndex.value ? "typeBoxSelected" : "typeBoxNormal";
  1765. };
  1766. //获取当前tags列表
  1767. const getOpCompentArray = async () => {
  1768. const { data } = await getOpCompent(
  1769. "/" +
  1770. `${Number(
  1771. taskArray.value[taskIndex.value].ops[selectStepIndex.value].operationId
  1772. )}` +
  1773. "/" +
  1774. `${store.scanInfo.id}`
  1775. );
  1776. stepComponents.value = setStepComponents(data);
  1777. router.replace({ name: stepComponents.value[selectIndex.value].name });
  1778. };
  1779. //设置标签是否被选中
  1780. const setSelectIndex = (index) => {
  1781. if (componentsDisabled.value != true) {
  1782. selectIndex.value = index;
  1783. }
  1784. };
  1785. const init = async (index, status) => {
  1786. if (taskIndex.value == null || status == true) {
  1787. return;
  1788. }
  1789. selectStepIndex.value = index != null ? index : 0;
  1790. //数据设置
  1791. store.odersData.operationId =
  1792. taskArray.value[taskIndex.value].ops[selectStepIndex.value].operationId;
  1793. store.processInfo.operationCode =
  1794. taskArray.value[taskIndex.value].ops[selectStepIndex.value].operationCode;
  1795. store.processInfo.operationName =
  1796. taskArray.value[taskIndex.value].ops[selectStepIndex.value].operationName;
  1797. snVal.value =
  1798. taskArray.value[taskIndex.value].ops[selectStepIndex.value].seqs.length > 0
  1799. ? taskArray.value[taskIndex.value].ops[selectStepIndex.value].seqs[0]
  1800. .seqNo
  1801. : null;
  1802. if (snVal.value != null) {
  1803. const res = await getScanData();
  1804. if (res == true) {
  1805. await getOpCompentArray();
  1806. }
  1807. } else {
  1808. stepComponents.value = [];
  1809. ElMessage.warning("当前工序暂不可操作");
  1810. }
  1811. };
  1812. onActivated(async () => {
  1813. //缓存组件数据逻辑
  1814. init(selectStepIndex.value);
  1815. });
  1816. watch(
  1817. () => taskIndex.value,
  1818. (val) => {
  1819. if (val != null) {
  1820. componentsDisabled.value = false;
  1821. }
  1822. }
  1823. );
  1824. </script>
  1825. <style lang="scss" scoped>
  1826. .materialInfoBox {
  1827. height: 240px;
  1828. font-size: 18px;
  1829. background-color: #d7d7d7;
  1830. border-radius: 16px;
  1831. display: flex;
  1832. flex-direction: column;
  1833. justify-content: center;
  1834. align-items: center;
  1835. .productitleText {
  1836. font-size: 20px;
  1837. font-weight: 600;
  1838. }
  1839. }
  1840. .selcetedMaterialInfoBox {
  1841. background-color: #ffffff70;
  1842. background-image: url("@/assets/images/caijiwancheng.png");
  1843. background-position: right top;
  1844. background-repeat: no-repeat;
  1845. }
  1846. .materialInfoBoxTemplate {
  1847. height: 160px;
  1848. font-size: 18px;
  1849. background-color: #02a7f0;
  1850. border-radius: 16px;
  1851. display: flex;
  1852. flex-direction: column;
  1853. justify-content: center;
  1854. align-items: center;
  1855. .productitleText {
  1856. font-size: 20px;
  1857. font-weight: 600;
  1858. }
  1859. }
  1860. .selcetedMaterialInfoBoxTemplate {
  1861. background-color: #ffffff70;
  1862. background-position: right top;
  1863. background-repeat: no-repeat;
  1864. }
  1865. .selectOpBox {
  1866. height: 100px;
  1867. margin-bottom: 10px;
  1868. background-color: #d5dade;
  1869. border-radius: 5px;
  1870. }
  1871. .disabled {
  1872. opacity: 0.6 !important;
  1873. }
  1874. :deep(.el-input__wrapper) {
  1875. background-color: #000;
  1876. }
  1877. .boxStyle {
  1878. height: calc(100vh - 80px);
  1879. .commonTitle {
  1880. color: var(--ohos-text);
  1881. font-size: 28px;
  1882. }
  1883. }
  1884. .productInfo {
  1885. width: 100%;
  1886. height: 100px;
  1887. margin-bottom: 10px;
  1888. border-radius: 5px;
  1889. background-color: #d5dade;
  1890. padding: 10px 20px;
  1891. cursor: pointer;
  1892. .productitleText {
  1893. color: black;
  1894. }
  1895. }
  1896. .optionBox {
  1897. height: calc(100vh - 150px);
  1898. background-color: #d5dade;
  1899. border-radius: 16px;
  1900. }
  1901. .headerInfo {
  1902. height: 20px;
  1903. width: calc(100vw - 40px);
  1904. // padding: 10px;
  1905. // margin: 0 20px;
  1906. // display: flex;
  1907. // justify-content: space-between;
  1908. // align-items: center;
  1909. // border-radius: 16px;
  1910. // border-right: 0px;
  1911. // border-left: 0px;
  1912. // box-sizing: border-box;
  1913. // margin-bottom: 10px;
  1914. // background-color: white;
  1915. .info {
  1916. display: flex;
  1917. flex-shrink: 0;
  1918. .item {
  1919. margin: 0 5px;
  1920. font-size: 14px;
  1921. font-weight: 300;
  1922. }
  1923. }
  1924. }
  1925. .scrollbar-demo-item {
  1926. flex-shrink: 0;
  1927. display: flex;
  1928. align-items: center;
  1929. justify-content: center;
  1930. height: 80px;
  1931. width: 135px;
  1932. border-radius: 16px;
  1933. text-align: center;
  1934. background-color: #d5dade;
  1935. margin-right: 10px;
  1936. }
  1937. .typeContainer {
  1938. width: 100%;
  1939. height: 80px;
  1940. overflow-x: auto;
  1941. .svgIcon {
  1942. @include flex;
  1943. }
  1944. }
  1945. .mainContentBox {
  1946. height: calc(100vh - 110px);
  1947. }
  1948. .routerView {
  1949. display: flex;
  1950. flex: 1;
  1951. overflow-y: auto;
  1952. width: 100%;
  1953. height: calc(100vh - 214px);
  1954. margin-top: 20px;
  1955. background-color: #ffffff20 !important;
  1956. padding: 0 20px;
  1957. border-radius: 16px;
  1958. }
  1959. .typeBox {
  1960. height: 80px;
  1961. width: 135px;
  1962. border-radius: 16px;
  1963. display: flex;
  1964. flex-direction: column;
  1965. justify-content: center;
  1966. align-items: center;
  1967. .name {
  1968. height: 16px;
  1969. font-weight: 500;
  1970. font-size: $f20;
  1971. line-height: 20px;
  1972. text-align: center;
  1973. font-style: normal;
  1974. text-transform: none;
  1975. margin-top: $p10;
  1976. }
  1977. }
  1978. .typeBoxNormal {
  1979. background: transparent;
  1980. color: black;
  1981. }
  1982. .typeBoxSelected {
  1983. background-color: var(--ohos-area-active-bg);
  1984. color: white !important;
  1985. }
  1986. :deep(.el-divider__text) {
  1987. padding: 0px;
  1988. }
  1989. .popView {
  1990. width: 80%;
  1991. display: flex;
  1992. flex-direction: column;
  1993. height: 80%;
  1994. background-color: #d5dade;
  1995. border-radius: 16px;
  1996. padding: 20px;
  1997. .hang {
  1998. display: flex;
  1999. align-items: center;
  2000. color: black;
  2001. font-size: 20px;
  2002. }
  2003. .taskBox {
  2004. display: grid;
  2005. grid-template-columns: repeat(3, 1fr); /* 每行 3 列 */
  2006. gap: 20px; /* 设置间距为 20px */
  2007. }
  2008. }
  2009. :deep(.el-input__wrapper) {
  2010. background-color: #00000020 !important;
  2011. }
  2012. :deep(.el-table--fit) {
  2013. background-color: #d5dade;
  2014. }
  2015. :deep(.el-table__cell) {
  2016. background-color: #d5dade;
  2017. }
  2018. :deep(.el-table__header > thead > tr > .el-table__cell) {
  2019. background-color: #d5dade !important;
  2020. }
  2021. </style>