detail.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816
  1. <template>
  2. <div class="ele-body">
  3. <div class="page-title">
  4. <el-page-header @back="$router.go(-1)">
  5. <div slot="content" class="pageContent">
  6. <div>详情</div>
  7. </div>
  8. </el-page-header>
  9. </div>
  10. <progressBox v-if="tabList.length" :list="tabList" :total="infoData.formingNum"/>
  11. <el-card>
  12. <el-descriptions title="" direction="vertical" :column="7" border>
  13. <el-descriptions-item label="工单号">{{infoData.code}}</el-descriptions-item>
  14. <el-descriptions-item label="生产版本" >{{infoData.produceVersionName}}</el-descriptions-item >
  15. <!-- <el-descriptions-item label="工单类型">苏州市</el-descriptions-item> -->
  16. <el-descriptions-item label="产线">{{infoData.productLine}}</el-descriptions-item>
  17. <el-descriptions-item label="工艺路线版本">{{infoData.routingVersion}}</el-descriptions-item>
  18. <el-descriptions-item label="计划编号">{{infoData.productionPlanCode}}</el-descriptions-item>
  19. <el-descriptions-item label="计划类型">{{typeList[infoData.planType]}}</el-descriptions-item>
  20. <el-descriptions-item label="产品编码">{{infoData.productCode}}</el-descriptions-item>
  21. <el-descriptions-item label="产品名称">{{infoData.productName}}</el-descriptions-item>
  22. <el-descriptions-item label="牌号 | 型号">{{infoData.brandNo}} | {{infoData.model}}</el-descriptions-item>
  23. <el-descriptions-item label="要求成型数量(PCS)">{{infoData.formingNum}}</el-descriptions-item>
  24. <el-descriptions-item label="要求成型重量(KG)">{{infoData.formingWeight}}</el-descriptions-item>
  25. <el-descriptions-item label="计划开始时间">{{infoData.planStartTime}}</el-descriptions-item>
  26. <el-descriptions-item label="实际开始时间">{{infoData.startTime}}</el-descriptions-item>
  27. <el-descriptions-item label="已成型数量(PCS)">{{infoData.formedNum}}</el-descriptions-item>
  28. <el-descriptions-item label="已成型重量(KG)">{{infoData.formedWeight}}</el-descriptions-item>
  29. <el-descriptions-item label="已交付数量(PCS)">{{infoData.deliveredQuantity}}</el-descriptions-item>
  30. <el-descriptions-item label="已交付重量(KG)">{{infoData.deliveredWeight}}</el-descriptions-item>
  31. <el-descriptions-item label="工单状态">{{statusList[infoData.status]}}</el-descriptions-item>
  32. <el-descriptions-item label="完成时间">{{infoData.completionTime}}</el-descriptions-item>
  33. <el-descriptions-item label="生产周期">{{infoData.productionCycle}}</el-descriptions-item>
  34. </el-descriptions>
  35. </el-card>
  36. <el-card v-if="tabList.length">
  37. <el-tabs v-model="activeName" type="card">
  38. <el-tab-pane
  39. :label="item.taskTypeName"
  40. :name="item.taskTypeName"
  41. v-for="item in tabList"
  42. :key="item.taskCode"
  43. ></el-tab-pane>
  44. <!-- <el-tab-pane label="挤压成型" name="1"> </el-tab-pane>
  45. <el-tab-pane label="自然干燥" name="2"></el-tab-pane>
  46. <el-tab-pane label="升温干燥" name="3"></el-tab-pane>
  47. <el-tab-pane label="半加定长" name="4"></el-tab-pane>
  48. <el-tab-pane label="备炉" name="5"></el-tab-pane>
  49. <el-tab-pane label="烧结" name="6"></el-tab-pane>
  50. <el-tab-pane label="深加工" name="7"></el-tab-pane>
  51. <el-tab-pane label="包装" name="8"></el-tab-pane>
  52. <el-tab-pane label="入库" name="9"></el-tab-pane> -->
  53. </el-tabs>
  54. <ele-pro-table
  55. :columns="columnOpt[activeName] || columnOpt['深加工'] "
  56. :datasource="datasource"
  57. :key="activeName"
  58. :cache-key="`produceDetal${activeName}`"
  59. :initLoad="false"
  60. ref="table"
  61. >
  62. <template v-slot:toolbar>
  63. <div class="tips-box">
  64. <ul v-if="activeName == '挤压成型'">
  65. <li>
  66. <span class="label">累计合格品数量</span>
  67. 1500PCS
  68. </li>
  69. <li>
  70. <span class="label">累计合格品重量</span>
  71. 1500PCS
  72. </li>
  73. <li>
  74. <span class="label">累计投料重量</span>
  75. 1500PCS
  76. </li>
  77. </ul>
  78. <ul v-else-if="['自然干燥', '升温干燥', '半加定长'].includes(activeName)">
  79. <li>
  80. <span class="label">累计合格品数量</span>
  81. 1500PCS
  82. </li>
  83. <li>
  84. <span class="label">累计合格品重量</span>
  85. 1500PCS
  86. </li>
  87. <li>
  88. <span class="label">累计投料产品重量</span>
  89. 1500PCS
  90. </li>
  91. </ul>
  92. <ul v-else-if="['备炉'].includes(activeName)">
  93. <li>
  94. <span class="label">累计交接数量</span>
  95. 1500PCS
  96. </li>
  97. <li>
  98. <span class="label">累计实际数量</span>
  99. 1500PCS
  100. </li>
  101. </ul>
  102. <ul v-else-if="['烧结', '质检', '深加工'].includes(activeName)">
  103. <li>
  104. <span class="label">累计合格品数量</span>
  105. 1500PCS
  106. </li>
  107. <li>
  108. <span class="label">累计合格品重量</span>
  109. 1500PCS
  110. </li>
  111. <li>
  112. <span class="label">累计投料数量</span>
  113. 1500PCS
  114. </li>
  115. </ul>
  116. <ul v-else-if="['包装'].includes(activeName)">
  117. <li>
  118. <span class="label">累计交接数量</span>
  119. 1500PCS
  120. </li>
  121. <li>
  122. <span class="label">累计实际数量</span>
  123. 1500PCS
  124. </li>
  125. <li>
  126. <span class="label">累计包装数量</span>
  127. 1500PCS
  128. </li>
  129. <li>
  130. <span class="label">累计包装产品数量</span>
  131. 1500PCS
  132. </li>
  133. </ul>
  134. <ul v-else-if="['缴库'].includes(activeName)">
  135. <li>
  136. <span class="label">累计交接数量</span>
  137. 1500PCS
  138. </li>
  139. <li>
  140. <span class="label">累计批次数量</span>
  141. 1500PCS
  142. </li>
  143. <li>
  144. <span class="label">累计产品数量</span>
  145. 1500PCS
  146. </li>
  147. </ul>
  148. <!-- <el-link type="primary" v-if="activeName == 1" @click="openOther"
  149. >其他任务记录</el-link
  150. > -->
  151. </div>
  152. </template>
  153. <template v-slot:action>
  154. <el-link type="primary">冲销</el-link>
  155. </template>
  156. </ele-pro-table>
  157. </el-card>
  158. <otherMission ref="otherMissionRef" />
  159. </div>
  160. </template>
  161. <script>
  162. import progressBox from './components/progressBox';
  163. import otherMission from './components/otherMission';
  164. import { getTaskListById } from '@/api/mainData/index.js';
  165. import { reportPage , getInfoById } from '@/api/produceOrder/index.js';
  166. export default {
  167. components: {
  168. otherMission,
  169. progressBox
  170. },
  171. data () {
  172. return {
  173. infoData:{},
  174. descriptionsShow: true,
  175. activeName: '挤压成型',
  176. tabList:[],
  177. columnOpt: {
  178. 挤压成型: [
  179. {
  180. label: '序号',
  181. type: 'index',
  182. width: 55
  183. },
  184. {
  185. label: '投料时间',
  186. prop: 'feedingTime'
  187. },
  188. {
  189. label: '投料重量',
  190. prop: 'feedingWeight'
  191. },
  192. {
  193. label: '投料执行人',
  194. prop: 'feedingOperator'
  195. },
  196. {
  197. label: '设备编码',
  198. prop: 'deviceCode'
  199. },
  200. {
  201. label: '设备名称',
  202. prop: 'deviceName'
  203. },
  204. {
  205. label: '报工时间',
  206. prop: 'reportWorkTime'
  207. },
  208. {
  209. label: '报工执行人',
  210. prop: 'reportingOperator'
  211. },
  212. {
  213. label: '周转车编码',
  214. prop: 'transferCarCode'
  215. },
  216. {
  217. label: '合格品数量',
  218. prop: 'standardNum'
  219. },
  220. {
  221. label: '合格品重量',
  222. prop: 'standardWeight'
  223. },
  224. {
  225. label: '不合格品数量',
  226. prop: 'noStandardNum'
  227. },
  228. {
  229. label: '不合格品重量',
  230. prop: 'noStandardWeight'
  231. },
  232. {
  233. label: '副产品重量',
  234. prop: 'secondaryProductWeight'
  235. },
  236. {
  237. label: '操作',
  238. slot: 'action'
  239. }
  240. ],
  241. 自然干燥: [
  242. {
  243. label: '序号',
  244. type: 'index',
  245. width: 55
  246. },
  247. {
  248. label: '投料时间',
  249. prop: 'feedingTime'
  250. },
  251. {
  252. label: '投料执行人',
  253. prop: 'feedingOperator'
  254. },
  255. {
  256. label: '产品数量',
  257. prop: 'productNum'
  258. },
  259. {
  260. label: '周转车编码',
  261. prop: 'transferCarCode'
  262. },
  263. {
  264. label: '区域编码',
  265. prop: 'areaCode'
  266. },
  267. {
  268. label: '干燥时长',
  269. prop: 'dryingDuration'
  270. },
  271. {
  272. label: '报工时间',
  273. prop: 'reportWorkTime'
  274. },
  275. {
  276. label: '报工执行人',
  277. prop: 'reportingOperator'
  278. },
  279. {
  280. label: '合格品数量',
  281. prop: 'standardNum'
  282. },
  283. {
  284. label: '合格品重量',
  285. prop: 'standardWeight'
  286. },
  287. {
  288. label: '不合格品数量',
  289. prop: 'noStandardNum'
  290. },
  291. {
  292. label: '不合格品重量',
  293. prop: 'noStandardWeight'
  294. },
  295. {
  296. label: '副产品重量',
  297. prop: 'secondaryProductWeight'
  298. },
  299. {
  300. label: '操作',
  301. slot: 'action'
  302. }
  303. ],
  304. 升温干燥: [
  305. {
  306. label: '序号',
  307. type: 'index',
  308. width: 55
  309. },
  310. {
  311. label: '投料时间',
  312. prop: 'feedingTime'
  313. },
  314. {
  315. label: '投料执行人',
  316. prop: 'feedingOperator'
  317. },
  318. {
  319. label: '产品数量',
  320. prop: 'productNum'
  321. },
  322. {
  323. label: '周转车编码',
  324. prop: 'transferCarCode'
  325. },
  326. {
  327. label: '设备编码',
  328. prop: 'deviceCode'
  329. },
  330. {
  331. label: '设备名称',
  332. prop: 'deviceName'
  333. },
  334. {
  335. label: '升温曲线',
  336. prop: 'temperatureRamp'
  337. },
  338. {
  339. label: '报工时间',
  340. prop: 'reportWorkTime'
  341. },
  342. {
  343. label: '报工执行人',
  344. prop: 'reportingOperator'
  345. },
  346. {
  347. label: '合格品数量',
  348. prop: 'standardNum'
  349. },
  350. {
  351. label: '合格品重量',
  352. prop: 'standardWeight'
  353. },
  354. {
  355. label: '不合格品数量',
  356. prop: 'noStandardNum'
  357. },
  358. {
  359. label: '不合格品重量',
  360. prop: 'noStandardWeight'
  361. },
  362. {
  363. label: '副产品重量',
  364. prop: 'secondaryProductWeight'
  365. },
  366. {
  367. label: '操作',
  368. slot: 'action'
  369. }
  370. ],
  371. 半加定长: [
  372. {
  373. label: '序号',
  374. type: 'index',
  375. width: 55
  376. },
  377. {
  378. label: '投料时间',
  379. prop: 'feedingTime'
  380. },
  381. {
  382. label: '投料执行人',
  383. prop: 'feedingOperator'
  384. },
  385. {
  386. label: '产品数量',
  387. prop: 'productNum'
  388. },
  389. {
  390. label: '周转车编码',
  391. prop: 'transferCarCode'
  392. },
  393. {
  394. label: '设备编码',
  395. prop: 'deviceCode'
  396. },
  397. {
  398. label: '设备名称',
  399. prop: 'deviceName'
  400. },
  401. {
  402. label: '报工时间',
  403. prop: 'reportWorkTime'
  404. },
  405. {
  406. label: '报工执行人',
  407. prop: 'reportingOperator'
  408. },
  409. {
  410. label: '合格品数量',
  411. prop: 'standardNum'
  412. },
  413. {
  414. label: '合格品重量',
  415. prop: 'standardWeight'
  416. },
  417. {
  418. label: '不合格品数量',
  419. prop: 'noStandardNum'
  420. },
  421. {
  422. label: '不合格品重量',
  423. prop: 'noStandardWeight'
  424. },
  425. {
  426. label: '副产品重量',
  427. prop: 'secondaryProductWeight'
  428. },
  429. {
  430. label: '操作',
  431. slot: 'action'
  432. }
  433. ],
  434. 备炉: [
  435. {
  436. label: '序号',
  437. type: 'index',
  438. width: 55
  439. },
  440. {
  441. label: '交接时间',
  442. prop: 'handoverTime'
  443. },
  444. {
  445. label: '交接执行人',
  446. prop: 'handoverOperator'
  447. },
  448. {
  449. label: '交接数量',
  450. prop: 'handoverQuantity'
  451. },
  452. {
  453. label: '实际数量',
  454. prop: 'actualQuantity'
  455. },
  456. {
  457. label: '执行时间',
  458. prop: 'executionTime'
  459. },
  460. {
  461. label: '执行人',
  462. prop: 'executor'
  463. },
  464. {
  465. label: '设备编码',
  466. prop: 'deviceCode'
  467. },
  468. {
  469. label: '设备名称',
  470. prop: 'deviceName'
  471. },
  472. {
  473. label: '烧结曲线',
  474. prop: 'sinteringCurve'
  475. },
  476. {
  477. label: '操作',
  478. slot: 'action'
  479. }
  480. ],
  481. 烧结: [
  482. {
  483. label: '序号',
  484. type: 'index',
  485. width: 55
  486. },
  487. {
  488. label: '报工时间',
  489. prop: 'reportWorkTime'
  490. },
  491. {
  492. label: '报工执行人',
  493. prop: 'reportingOperator'
  494. },
  495. {
  496. label: '合格品数量',
  497. prop: 'standardNum'
  498. },
  499. {
  500. label: '合格品重量',
  501. prop: 'standardWeight'
  502. },
  503. {
  504. label: '不合格品数量',
  505. prop: 'noStandardNum'
  506. },
  507. {
  508. label: '不合格品重量',
  509. prop: 'noStandardWeight'
  510. },
  511. {
  512. label: '副产品重量',
  513. prop: 'secondaryProductWeight'
  514. },
  515. {
  516. label: '操作',
  517. slot: 'action'
  518. }
  519. ],
  520. 质检: [
  521. {
  522. label: '序号',
  523. type: 'index',
  524. width: 55
  525. },
  526. {
  527. label: '报工时间',
  528. prop: 'reportWorkTime'
  529. },
  530. {
  531. label: '报工执行人',
  532. prop: 'reportingOperator'
  533. },
  534. {
  535. label: '合格品数量',
  536. prop: 'standardNum'
  537. },
  538. {
  539. label: '合格品重量',
  540. prop: 'standardWeight'
  541. },
  542. {
  543. label: '不合格品数量',
  544. prop: 'noStandardNum'
  545. },
  546. {
  547. label: '不合格品重量',
  548. prop: 'noStandardWeight'
  549. },
  550. {
  551. label: '副产品重量',
  552. prop: 'secondaryProductWeight'
  553. },
  554. {
  555. label: '操作',
  556. slot: 'action'
  557. }
  558. ],
  559. 深加工: [
  560. {
  561. label: '序号',
  562. type: 'index',
  563. width: 55
  564. },
  565. {
  566. label: '交接时间',
  567. prop: 'handoverTime'
  568. },
  569. {
  570. label: '交接执行人',
  571. prop: 'handoverOperator'
  572. },
  573. {
  574. label: '交接数量',
  575. prop: 'handoverQuantity'
  576. },
  577. {
  578. label: '实际数量',
  579. prop: 'actualQuantity'
  580. },
  581. {
  582. label: '投料时间',
  583. prop: 'feedingTime'
  584. },
  585. {
  586. label: '投料执行人',
  587. prop: 'feedingOperator'
  588. },
  589. {
  590. label: '设备编码',
  591. prop: 'deviceCode'
  592. },
  593. {
  594. label: '设备名称',
  595. prop: 'deviceName'
  596. },
  597. {
  598. label: '报工时间',
  599. prop: 'reportWorkTime'
  600. },
  601. {
  602. label: '报工执行人',
  603. prop: 'reportingOperator'
  604. },
  605. {
  606. label: '合格品数量',
  607. prop: 'standardNum'
  608. },
  609. {
  610. label: '合格品重量',
  611. prop: 'standardWeight'
  612. },
  613. {
  614. label: '不合格品数量',
  615. prop: 'noStandardNum'
  616. },
  617. {
  618. label: '不合格品重量',
  619. prop: 'noStandardWeight'
  620. },
  621. {
  622. label: '副产品重量',
  623. prop: 'secondaryProductWeight'
  624. },
  625. {
  626. label: '操作',
  627. slot: 'action'
  628. }
  629. ],
  630. 包装: [
  631. {
  632. label: '序号',
  633. type: 'index',
  634. width: 55
  635. },
  636. {
  637. label: '交接时间',
  638. prop: 'handoverTime'
  639. },
  640. {
  641. label: '交接执行人',
  642. prop: 'handoverOperator'
  643. },
  644. {
  645. label: '交接数量',
  646. prop: 'handoverQuantity'
  647. },
  648. {
  649. label: '实际数量',
  650. prop: 'actualQuantity'
  651. },
  652. {
  653. label: '报工时间',
  654. prop: 'reportWorkTime'
  655. },
  656. {
  657. label: '报工执行人',
  658. prop: 'reportingOperator'
  659. },
  660. {
  661. label: '包装数量',
  662. prop: 'packagingQuantity'
  663. },
  664. {
  665. label: '包装产品数量',
  666. prop: 'packagedProductQuantity'
  667. },
  668. {
  669. label: '尾料数量',
  670. prop: 'tailingsQuantity'
  671. },
  672. {
  673. label: '物料清单',
  674. prop: 'materialList'
  675. },
  676. {
  677. label: '操作',
  678. slot: 'action'
  679. }
  680. ],
  681. 缴库: [
  682. {
  683. label: '序号',
  684. type: 'index',
  685. width: 55
  686. },
  687. {
  688. label: '交接时间',
  689. prop: 'handoverTime'
  690. },
  691. {
  692. label: '交接执行人',
  693. prop: 'handoverOperator'
  694. },
  695. {
  696. label: '交接数量',
  697. prop: 'handoverQuantity'
  698. },
  699. {
  700. label: '实际数量',
  701. prop: 'actualQuantity'
  702. },
  703. {
  704. label: '报工时间',
  705. prop: 'reportWorkTime'
  706. },
  707. {
  708. label: '报工执行人',
  709. prop: 'reportingOperator'
  710. },
  711. {
  712. label: '批次数量',
  713. prop: 'batchQuantity'
  714. },
  715. {
  716. label: '入库数量',
  717. prop: 'inboundQuantity'
  718. },
  719. {
  720. label: '交货仓库',
  721. prop: 'deliveryWarehouse'
  722. },
  723. {
  724. label: '操作',
  725. slot: 'action'
  726. }
  727. ]
  728. },
  729. workOrderId:'',
  730. taskCode:'',
  731. typeList:{
  732. 1:'内销订单',
  733. 2:'外销订单',
  734. 3:'预制订单'
  735. },
  736. statusList:{
  737. 4:'待生产',
  738. 5:'生产中',
  739. 6:'已完成',
  740. 7:'已延期'
  741. }
  742. };
  743. },
  744. created () {
  745. this.workOrderId = this.$route.query.id
  746. this.getInfo(this.workOrderId)
  747. },
  748. methods: {
  749. datasource({ page, limit,where }) {
  750. return reportPage({ ...where, pageNum:page, size:limit });
  751. },
  752. /* 刷新表格 */
  753. reload (where) {
  754. this.$nextTick(() =>
  755. this.$refs.table.reload({ page: 1, limit: 10, where })
  756. );
  757. },
  758. async getInfo(id){
  759. const res = await getInfoById(id)
  760. this.infoData = res
  761. if(typeof res.taskTypeProcessDiagrams == 'string' ){
  762. this.tabList = []
  763. }else{
  764. this.tabList = res.taskTypeProcessDiagrams
  765. }
  766. this.activeName = this.tabList[0]?.taskTypeName || ''
  767. this.taskCode = this.tabList[0]?.taskCode || ''
  768. this.reload({workOrderId:this.workOrderId, taskCode:this.taskCode})
  769. },
  770. // async getTab (id) {
  771. // const res = await getTaskListById(id);
  772. // this.tabList = res;
  773. // this.activeName = res[0]?.taskTypeName || '';
  774. // this.getTabList(res[0].taskCode)
  775. // },
  776. // async getTabList(code){
  777. // const data = {
  778. // pageNum:1,
  779. // size:10,
  780. // taskCode:code,
  781. // workOrderId:this.workOrderId
  782. // }
  783. // const res = await reportPage(data)
  784. // console.log('res',res)
  785. // },
  786. openOther () {
  787. this.$refs.otherMissionRef.open();
  788. }
  789. }
  790. };
  791. </script>
  792. <style lang="scss" scoped>
  793. .el-tabs {
  794. margin-top: 20px;
  795. }
  796. .tips-box {
  797. display: flex;
  798. justify-content: space-between;
  799. align-items: center;
  800. padding-right: 20px;
  801. ul {
  802. list-style: none;
  803. display: flex;
  804. justify-content: flex-start;
  805. li {
  806. margin-right: 40px;
  807. }
  808. }
  809. }
  810. </style>