detailMixins.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679
  1. const qualityResultList = { 1: '合格', 2: '不合格' };
  2. const disposalStatustList = { 0: '待处置', 1: '处置中', 2: '处置完成' };
  3. export default {
  4. data() {
  5. return {
  6. infoList: [
  7. {
  8. label: '编码',
  9. prop: 'code',
  10. span: 6
  11. },
  12. {
  13. label: '产品名称',
  14. prop: 'productName',
  15. span: 6
  16. },
  17. {
  18. label: '产品编码',
  19. prop: 'productCode',
  20. span: 6
  21. },
  22. {
  23. label: '批次号',
  24. prop: 'batchNo',
  25. span: 6
  26. },
  27. {
  28. label: '规格',
  29. prop: 'specification',
  30. span: 6
  31. },
  32. {
  33. label: '型号',
  34. prop: 'modelType',
  35. span: 6
  36. },
  37. {
  38. label: '牌号',
  39. prop: 'brandNo',
  40. span: 6
  41. },
  42. {
  43. label: '计量类型',
  44. prop: 'inspectionStandardsName',
  45. span: 6
  46. },
  47. {
  48. label: '质检部门',
  49. prop: 'groupName',
  50. span: 6
  51. },
  52. {
  53. label: '质检人',
  54. prop: 'qualityName',
  55. span: 6
  56. },
  57. {
  58. label: '质检时间',
  59. prop: 'qualityTime',
  60. span: 6
  61. },
  62. {
  63. prop: 'executeJobName',
  64. span: 6,
  65. label: '执行班组',
  66. },
  67. {
  68. prop: 'executeUserName',
  69. span: 6,
  70. label: '执行人'
  71. },
  72. {
  73. label: '工时(h)',
  74. prop: 'hours',
  75. span: 6
  76. },
  77. {
  78. label: '合格率',
  79. prop: 'qualificationRate',
  80. span: 6
  81. },
  82. {
  83. label: '不合格率',
  84. prop: 'noQualificationRate',
  85. span: 6
  86. },
  87. {
  88. label: '检验方式',
  89. prop: 'qualityModeName',
  90. span: 6
  91. },
  92. {
  93. label: '质检结果',
  94. prop: 'qualityResultsName',
  95. span: 6
  96. },
  97. {
  98. label: '总重量',
  99. prop: 'totalWeight',
  100. span: 6
  101. },
  102. {
  103. label: '总数量',
  104. prop: 'total',
  105. span: 6
  106. }
  107. ],
  108. disposeTypeMap: {
  109. 1: '返工',
  110. 2: '返修',
  111. 3: '报废',
  112. 4: '降级使用',
  113. 5: '让步接收',
  114. 6: '留样',
  115. 7: '消耗',
  116. 8: '回用/归批',
  117. 9: '转试销',
  118. 10: '退货'
  119. },
  120. tableColumns1: [
  121. {
  122. columnKey: 'index',
  123. label: '序号',
  124. type: 'index',
  125. width: 55,
  126. align: 'center',
  127. fixed: 'left'
  128. },
  129. {
  130. label: '编码',
  131. prop: 'categoryCode',
  132. width: 150,
  133. align: 'center',
  134. showOverflowTooltip: true
  135. },
  136. {
  137. label: '名称',
  138. prop: 'categoryName',
  139. width: '150',
  140. align: 'center',
  141. width: 120,
  142. showOverflowTooltip: true
  143. },
  144. {
  145. label: '批次号',
  146. prop: 'batchNo',
  147. align: 'center',
  148. width: 120,
  149. showOverflowTooltip: true
  150. },
  151. {
  152. label: '发货条码',
  153. prop: 'barcodes',
  154. align: 'center',
  155. showOverflowTooltip: true
  156. },
  157. {
  158. label: '包装编码',
  159. prop: 'packageNo',
  160. align: 'center',
  161. width: 120,
  162. showOverflowTooltip: true
  163. },
  164. { label: '包装数量', prop: 'packingQuantity', align: 'center' },
  165. { label: '包装单位', prop: 'packingUnit', align: 'center' },
  166. { label: '计量数量', prop: 'measureQuantity', align: 'center' },
  167. { label: '计量单位', prop: 'measureUnit', align: 'center' },
  168. {
  169. label: '物料代号',
  170. prop: 'materielDesignation',
  171. align: 'center',
  172. showOverflowTooltip: true
  173. },
  174. {
  175. label: '客户代号',
  176. prop: 'clientCode',
  177. align: 'center',
  178. showOverflowTooltip: true
  179. },
  180. {
  181. label: '供应商名称',
  182. prop: 'supplierName',
  183. align: 'center',
  184. width: 120,
  185. showOverflowTooltip: true
  186. },
  187. {
  188. label: '供应商代号',
  189. prop: 'supplierCode',
  190. align: 'center',
  191. width: '120',
  192. showOverflowTooltip: true
  193. },
  194. { label: '刻码', prop: 'engrave', align: 'center' },
  195. { label: '重量', prop: 'weight', align: 'center' },
  196. { label: '重量单位', prop: 'weightUnit', align: 'center' },
  197. {
  198. label: '仓库',
  199. prop: 'warehouseName',
  200. align: 'center',
  201. width: 120,
  202. showOverflowTooltip: true
  203. },
  204. { label: '货区', prop: 'areaName', align: 'center' },
  205. { label: '货架', prop: 'goodsShelfName', align: 'center' },
  206. { label: '货位', prop: 'goodsAllocationName', align: 'center' },
  207. {
  208. label: '生产日期',
  209. prop: 'productionDate',
  210. align: 'center',
  211. width: 120,
  212. showOverflowTooltip: true
  213. },
  214. {
  215. label: '采购日期',
  216. prop: 'purchaseDate',
  217. align: 'center',
  218. width: 120,
  219. showOverflowTooltip: true
  220. }
  221. ],
  222. tableColumns2: [
  223. {
  224. columnKey: 'index',
  225. label: '序号',
  226. type: 'index',
  227. width: 55,
  228. align: 'center',
  229. fixed: 'left'
  230. },
  231. {
  232. label: '样品编码',
  233. prop: 'sampleCode',
  234. width: '200',
  235. align: 'center',
  236. fixed: 'left',
  237. showOverflowTooltip: true
  238. },
  239. {
  240. label: '编码',
  241. prop: 'categoryCode',
  242. align: 'center',
  243. fixed: 'left',
  244. width: '150',
  245. showOverflowTooltip: true
  246. },
  247. {
  248. label: '名称',
  249. prop: 'categoryName',
  250. align: 'center',
  251. width: '150',
  252. showOverflowTooltip: true
  253. },
  254. {
  255. label: '批次号',
  256. prop: 'batchNo',
  257. align: 'center',
  258. showOverflowTooltip: true
  259. },
  260. {
  261. label: '发货条码',
  262. prop: 'barcodes',
  263. align: 'center',
  264. showOverflowTooltip: true
  265. },
  266. {
  267. label: '包装编码',
  268. prop: 'packageNo',
  269. align: 'center',
  270. width: '170',
  271. showOverflowTooltip: true
  272. },
  273. { label: '包装数量', prop: 'packingQuantity', align: 'center' },
  274. { label: '包装单位', prop: 'packingUnit', align: 'center' },
  275. { label: '计量数量', prop: 'measureQuantity', align: 'center' },
  276. { label: '计量单位', prop: 'measureUnit', align: 'center' },
  277. {
  278. label: '供应商名称',
  279. prop: 'supplierName',
  280. align: 'center',
  281. width: '120',
  282. showOverflowTooltip: true
  283. },
  284. {
  285. label: '供应商代号',
  286. prop: 'supplierCode',
  287. align: 'center',
  288. width: '120',
  289. showOverflowTooltip: true
  290. },
  291. {
  292. label: '物料代号',
  293. prop: 'materielDesignation',
  294. align: 'center',
  295. slot: 'materielDesignation',
  296. width: '120',
  297. showOverflowTooltip: true
  298. },
  299. {
  300. label: '客户代号',
  301. prop: 'clientCode',
  302. align: 'center',
  303. slot: 'clientCode',
  304. width: '120',
  305. showOverflowTooltip: true
  306. },
  307. {
  308. label: '刻码',
  309. prop: 'engrave',
  310. align: 'center',
  311. slot: 'engrave',
  312. width: '120',
  313. showOverflowTooltip: true
  314. },
  315. {
  316. label: '重量',
  317. prop: 'weight',
  318. align: 'center',
  319. slot: 'weight',
  320. width: '120'
  321. },
  322. {
  323. label: '重量单位',
  324. prop: 'weightUnit',
  325. align: 'center',
  326. width: 100
  327. },
  328. {
  329. label: '仓库',
  330. prop: 'warehouseName',
  331. align: 'center',
  332. width: 150,
  333. showOverflowTooltip: true
  334. },
  335. {
  336. label: '货区',
  337. prop: 'areaName',
  338. align: 'center',
  339. showOverflowTooltip: true
  340. },
  341. { label: '货架', prop: 'goodsShelfName', align: 'center' },
  342. { label: '货位', prop: 'goodsAllocationName', align: 'center' },
  343. {
  344. label: '生产日期',
  345. prop: 'productionDate',
  346. align: 'center',
  347. width: 150,
  348. showOverflowTooltip: true
  349. },
  350. {
  351. label: '采购日期',
  352. prop: 'purchaseDate',
  353. align: 'center',
  354. width: 150,
  355. showOverflowTooltip: true
  356. },
  357. {
  358. label: '处置状态',
  359. prop: 'disposeType',
  360. align: 'center',
  361. formatter: (_row) => {
  362. return this.disposeTypeMap[_row.disposeType] || '';
  363. }
  364. },
  365. {
  366. label: '处置时间',
  367. prop: 'disposeTime',
  368. align: 'center',
  369. showOverflowTooltip: true,
  370. width: 150
  371. },
  372. {
  373. label: '质检状态',
  374. prop: 'qualityStatus',
  375. align: 'center',
  376. formatter: (row) => {
  377. if (row.qualityStatus == 0) {
  378. return '未检';
  379. }
  380. if (row.qualityStatus == 1) {
  381. return '已检';
  382. }
  383. if (row.qualityStatus == 2) {
  384. return '待检';
  385. }
  386. }
  387. }
  388. ],
  389. tableColumns3: [
  390. {
  391. columnKey: 'index',
  392. label: '序号',
  393. type: 'index',
  394. width: 55,
  395. align: 'center',
  396. fixed: 'left'
  397. },
  398. {
  399. label: '质检方案编码',
  400. prop: 'qualitySchemeTemplateCode',
  401. align: 'center',
  402. showOverflowTooltip: true
  403. },
  404. {
  405. label: '质检方案名称',
  406. prop: 'qualitySchemeTemplateName',
  407. align: 'center',
  408. showOverflowTooltip: true
  409. },
  410. {
  411. label: '质检类型',
  412. prop: 'categoryLevelClassName',
  413. align: 'center',
  414. showOverflowTooltip: true
  415. },
  416. {
  417. label: '质检项编码',
  418. prop: 'inspectionCode',
  419. align: 'center',
  420. showOverflowTooltip: true
  421. },
  422. {
  423. label: '质检项名称',
  424. prop: 'inspectionName',
  425. align: 'center',
  426. showOverflowTooltip: true
  427. },
  428. {
  429. label: '工艺参数',
  430. prop: 'defaultValue',
  431. align: 'center',
  432. showOverflowTooltip: true,
  433. slot: 'defaultValue'
  434. }
  435. ],
  436. tableColumns4: [
  437. {
  438. type: 'index',
  439. columnKey: 'index',
  440. align: 'center',
  441. label: '序号',
  442. width: 55,
  443. showOverflowTooltip: true
  444. },
  445. {
  446. label: '样品编码',
  447. prop: 'sampleCode',
  448. minWidth: '150',
  449. align: 'center',
  450. showOverflowTooltip: true
  451. },
  452. {
  453. label: '物品编码',
  454. prop: 'categoryCode',
  455. minWidth: '150',
  456. align: 'center',
  457. showOverflowTooltip: true
  458. },
  459. {
  460. label: '物品名称',
  461. prop: 'categoryName',
  462. minWidth: '180',
  463. align: 'center',
  464. showOverflowTooltip: true
  465. },
  466. {
  467. prop: 'batchNo',
  468. label: '批次号',
  469. align: 'center',
  470. minWidth: '120',
  471. showOverflowTooltip: true
  472. },
  473. {
  474. label: '规格',
  475. prop: 'specification',
  476. width: '120',
  477. align: 'center',
  478. showOverflowTooltip: true
  479. },
  480. {
  481. label: '牌号',
  482. prop: 'brandNum',
  483. width: '120',
  484. align: 'center',
  485. showOverflowTooltip: true
  486. },
  487. {
  488. prop: 'modelType',
  489. label: '型号',
  490. align: 'center',
  491. width: '120',
  492. showOverflowTooltip: true
  493. },
  494. {
  495. prop: 'measureQuantity',
  496. label: '计量数量',
  497. align: 'center',
  498. width: '120',
  499. showOverflowTooltip: true
  500. },
  501. {
  502. prop: 'measureUnit',
  503. label: '计量单位',
  504. align: 'center',
  505. width: '120',
  506. showOverflowTooltip: true
  507. },
  508. {
  509. prop: 'weight',
  510. label: '重量',
  511. align: 'center',
  512. width: '120',
  513. showOverflowTooltip: true
  514. },
  515. {
  516. prop: 'weightUnit',
  517. label: '重量单位',
  518. align: 'center',
  519. width: '120',
  520. showOverflowTooltip: true
  521. },
  522. {
  523. prop: 'disposalStatus',
  524. label: '处置状态',
  525. align: 'center',
  526. width: '120',
  527. showOverflowTooltip: true,
  528. formatter: (row, column, cellValue) => {
  529. return disposalStatustList[cellValue ? cellValue : 0];
  530. }
  531. },
  532. {
  533. prop: 'disposeType',
  534. label: '处置类型',
  535. align: 'center',
  536. width: '120',
  537. showOverflowTooltip: true,
  538. formatter: (row, column, cellValue) => {
  539. return this.disposeTypeMap[cellValue];
  540. }
  541. },
  542. {
  543. prop: 'qualityResults',
  544. label: '质检结果',
  545. align: 'center',
  546. width: '120',
  547. showOverflowTooltip: true,
  548. formatter: (row, column, cellValue) => {
  549. return qualityResultList[cellValue];
  550. }
  551. }
  552. ],
  553. tableColumns5: [
  554. {
  555. columnKey: 'index',
  556. label: '序号',
  557. type: 'index',
  558. width: 55,
  559. align: 'center',
  560. showOverflowTooltip: true,
  561. fixed: 'left'
  562. },
  563. {
  564. label: '样品编码',
  565. prop: 'sampleCode',
  566. width: '150',
  567. align: 'center',
  568. showOverflowTooltip: true
  569. },
  570. {
  571. prop: 'categoryCode',
  572. label: '物品编码',
  573. width: '150',
  574. align: 'center',
  575. showOverflowTooltip: true
  576. },
  577. {
  578. prop: 'categoryName',
  579. label: '物品名称',
  580. width: '150',
  581. align: 'center',
  582. showOverflowTooltip: true
  583. },
  584. {
  585. label: '规格',
  586. prop: 'specification',
  587. width: '120',
  588. align: 'center',
  589. showOverflowTooltip: true
  590. },
  591. {
  592. prop: 'brandNum',
  593. label: '牌号',
  594. align: 'center'
  595. },
  596. {
  597. prop: 'modelType',
  598. label: '型号',
  599. align: 'center',
  600. width: '120',
  601. showOverflowTooltip: true
  602. },
  603. {
  604. prop: 'batchNo',
  605. label: '批次号',
  606. align: 'center',
  607. width: '120',
  608. showOverflowTooltip: true
  609. },
  610. {
  611. prop: 'weight',
  612. label: '重量',
  613. align: 'center',
  614. width: '120',
  615. showOverflowTooltip: true
  616. },
  617. {
  618. prop: 'weightUnit',
  619. label: '重量单位',
  620. align: 'center',
  621. width: '120',
  622. showOverflowTooltip: true
  623. },
  624. {
  625. prop: 'engrave',
  626. label: '刻码',
  627. align: 'center'
  628. },
  629. { label: '计量数量', prop: 'measureQuantity', align: 'center' },
  630. { label: '计量单位', prop: 'measureUnit', align: 'center' },
  631. {
  632. prop: 'produceRoutingName',
  633. label: '工艺路线',
  634. align: 'center'
  635. },
  636. {
  637. prop: 'produceTaskName',
  638. label: '工序',
  639. align: 'center'
  640. },
  641. {
  642. prop: 'unqualifiedReason',
  643. label: '原因',
  644. align: 'center'
  645. },
  646. {
  647. prop: 'disposeTime',
  648. label: '处置时间',
  649. align: 'center',
  650. width: '180',
  651. showOverflowTooltip: true
  652. },
  653. {
  654. prop: 'disposalStatus',
  655. label: '处置状态',
  656. align: 'center',
  657. width: '120',
  658. showOverflowTooltip: true,
  659. formatter: (row, column, cellValue) => {
  660. return disposalStatustList[cellValue ? cellValue : 0];
  661. }
  662. },
  663. {
  664. prop: 'disposeType',
  665. label: '处置类型',
  666. align: 'center',
  667. width: '120',
  668. showOverflowTooltip: true,
  669. formatter: (_row) => {
  670. return this.disposeTypeMap[_row.disposeType];
  671. }
  672. }
  673. ]
  674. };
  675. }
  676. };