You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

804 lines
25 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <script>
  2. import {queryQuoteDetailBomTree} from "@/api/quote/quoteDetailBomTree";
  3. import {
  4. queryQuoteDetailRouting,
  5. queryQuoteDetailRoutingAlternative, changeQuoteDetailRoutingChange,
  6. queryQuoteDetailRoutingVersion
  7. } from "@/api/quote/quoteDetailRouting";
  8. export default {
  9. name: "quoteDetailRouting",
  10. props:{
  11. quoteDetail:{
  12. type:Object,
  13. required:true
  14. },
  15. },
  16. model:{
  17. prop: "quoteDetail",
  18. event: "update"
  19. },
  20. data(){
  21. return{
  22. isAllRouting:false,
  23. dataList:[],
  24. queryLoading:false,
  25. treeData:[],
  26. columns: [
  27. {
  28. userId: this.$store.state.user.name,
  29. functionId: 5011,
  30. serialNumber: '5011Table5OperationNo',
  31. tableId: "5011Table5",
  32. tableName: "报价工艺信息",
  33. columnProp: 'operationNo',
  34. headerAlign: "center",
  35. align: "center",
  36. columnLabel: '工序号',
  37. columnHidden: false,
  38. columnImage: false,
  39. columnSortable: false,
  40. sortLv: 0,
  41. status: true,
  42. fixed: '',
  43. columnWidth: 60,
  44. },{
  45. userId: this.$store.state.user.name,
  46. functionId: 5011,
  47. serialNumber: '5011Table5OperationName',
  48. tableId: "5011Table5",
  49. tableName: "报价工艺信息",
  50. columnProp: 'operationName',
  51. headerAlign: "center",
  52. align: "left",
  53. columnLabel: '工序名称',
  54. columnHidden: false,
  55. columnImage: false,
  56. columnSortable: false,
  57. sortLv: 0,
  58. status: true,
  59. fixed: '',
  60. columnWidth: 120,
  61. },{
  62. userId: this.$store.state.user.name,
  63. functionId: 5011,
  64. serialNumber: '5011Table5PartNo',
  65. tableId: "5011Table5",
  66. tableName: "报价工艺信息",
  67. columnProp: 'partNo',
  68. headerAlign: "center",
  69. align: "left",
  70. columnLabel: '物料编码',
  71. columnHidden: false,
  72. columnImage: false,
  73. columnSortable: false,
  74. sortLv: 0,
  75. status: true,
  76. fixed: '',
  77. columnWidth: 100,
  78. },{
  79. userId: this.$store.state.user.name,
  80. functionId: 5011,
  81. serialNumber: '5011Table5PartDesc',
  82. tableId: "5011Table5",
  83. tableName: "报价工艺信息",
  84. columnProp: 'partDesc',
  85. headerAlign: "center",
  86. align: "left",
  87. columnLabel: '物料描述',
  88. columnHidden: false,
  89. columnImage: false,
  90. columnSortable: false,
  91. sortLv: 0,
  92. status: true,
  93. fixed: '',
  94. columnWidth: 200,
  95. },{
  96. userId: this.$store.state.user.name,
  97. functionId: 5011,
  98. serialNumber: '5011Table5Version',
  99. tableId: "5011Table5",
  100. tableName: "报价工艺信息",
  101. columnProp: 'routingRevision',
  102. headerAlign: "center",
  103. align: "center",
  104. columnLabel: '版本',
  105. columnHidden: false,
  106. columnImage: false,
  107. columnSortable: false,
  108. sortLv: 0,
  109. status: true,
  110. fixed: '',
  111. columnWidth: 80,
  112. },{
  113. userId: this.$store.state.user.name,
  114. functionId: 5011,
  115. serialNumber: '5011Table5AlternativeNo',
  116. tableId: "5011Table5",
  117. tableName: "报价工艺信息",
  118. columnProp: 'alternativeNo',
  119. headerAlign: "center",
  120. align: "left",
  121. columnLabel: '替代编码',
  122. columnHidden: false,
  123. columnImage: false,
  124. columnSortable: false,
  125. sortLv: 0,
  126. status: true,
  127. fixed: '',
  128. columnWidth: 100,
  129. },{
  130. userId: this.$store.state.user.name,
  131. functionId: 5011,
  132. serialNumber: '5011Table5WorkCenterNo',
  133. tableId: "5011Table5",
  134. tableName: "报价工艺信息",
  135. columnProp: 'workCenterNo',
  136. headerAlign: "center",
  137. align: "left",
  138. columnLabel: '加工中心编码',
  139. columnHidden: false,
  140. columnImage: false,
  141. columnSortable: false,
  142. sortLv: 0,
  143. status: true,
  144. fixed: '',
  145. columnWidth: 100,
  146. },{
  147. userId: this.$store.state.user.name,
  148. functionId: 5011,
  149. serialNumber: '5011Table5WorkCenterDesc',
  150. tableId: "5011Table5",
  151. tableName: "报价工艺信息",
  152. columnProp: 'workCenterDesc',
  153. headerAlign: "center",
  154. align: "left",
  155. columnLabel: '加工中心名称',
  156. columnHidden: false,
  157. columnImage: false,
  158. columnSortable: false,
  159. sortLv: 0,
  160. status: true,
  161. fixed: '',
  162. columnWidth: 200,
  163. },
  164. {
  165. userId: this.$store.state.user.name,
  166. functionId: 5011,
  167. serialNumber: '5011Table5MachSetupTime',
  168. tableId: "5011Table5",
  169. tableName: "报价工艺信息",
  170. columnProp: 'machSetupTime',
  171. headerAlign: "center",
  172. align: "right",
  173. columnLabel: '机器调机时间',
  174. columnHidden: false,
  175. columnImage: false,
  176. columnSortable: false,
  177. sortLv: 0,
  178. status: true,
  179. fixed: '',
  180. columnWidth: 100,
  181. },
  182. {
  183. userId: this.$store.state.user.name,
  184. functionId: 5011,
  185. serialNumber: '5011Table5SetupCrewSize',
  186. tableId: "5011Table5",
  187. tableName: "报价工艺信息",
  188. columnProp: 'setupCrewSize',
  189. headerAlign: "center",
  190. align: "right",
  191. columnLabel: '调机过程人数',
  192. columnHidden: false,
  193. columnImage: false,
  194. columnSortable: false,
  195. sortLv: 0,
  196. status: true,
  197. fixed: '',
  198. columnWidth: 100,
  199. },
  200. {
  201. userId: this.$store.state.user.name,
  202. functionId: 5011,
  203. serialNumber: '5011Table5SetupLaborClassNo',
  204. tableId: "5011Table5",
  205. tableName: "报价工艺信息",
  206. columnProp: 'setupLaborClassNo',
  207. headerAlign: "center",
  208. align: "left",
  209. columnLabel: '调机时人员等级',
  210. columnHidden: false,
  211. columnImage: false,
  212. columnSortable: false,
  213. sortLv: 0,
  214. status: true,
  215. fixed: '',
  216. columnWidth: 140,
  217. },
  218. {
  219. userId: this.$store.state.user.name,
  220. functionId: 5011,
  221. serialNumber: '5011Table5MachCycleTime',
  222. tableId: "5011Table5",
  223. tableName: "报价工艺信息",
  224. columnProp: 'machCycleTime',
  225. headerAlign: "center",
  226. align: "right",
  227. columnLabel: '机器处理时间',
  228. columnHidden: false,
  229. columnImage: false,
  230. columnSortable: false,
  231. sortLv: 0,
  232. status: true,
  233. fixed: '',
  234. columnWidth: 100,
  235. },
  236. {
  237. userId: this.$store.state.user.name,
  238. functionId: 5011,
  239. serialNumber: '5011Table5MachRunFactor',
  240. tableId: "5011Table5",
  241. tableName: "报价工艺信息",
  242. columnProp: 'machRunFactor',
  243. headerAlign: "center",
  244. align: "right",
  245. columnLabel: '机器单位产出',
  246. columnHidden: false,
  247. columnImage: false,
  248. columnSortable: false,
  249. sortLv: 0,
  250. status: true,
  251. fixed: '',
  252. columnWidth: 100,
  253. },
  254. {
  255. userId: this.$store.state.user.name,
  256. functionId: 5011,
  257. serialNumber: '5011Table5CrewSize',
  258. tableId: "5011Table5",
  259. tableName: "报价工艺信息",
  260. columnProp: 'crewSize',
  261. headerAlign: "center",
  262. align: "right",
  263. columnLabel: '生产过程人数',
  264. columnHidden: false,
  265. columnImage: false,
  266. columnSortable: false,
  267. sortLv: 0,
  268. status: true,
  269. fixed: '',
  270. columnWidth: 100,
  271. },
  272. {
  273. userId: this.$store.state.user.name,
  274. functionId: 5011,
  275. serialNumber: '5011Table5LaborClassNo',
  276. tableId: "5011Table5",
  277. tableName: "报价工艺信息",
  278. columnProp: 'laborClassNo',
  279. headerAlign: "center",
  280. align: "left",
  281. columnLabel: '人员等级',
  282. columnHidden: false,
  283. columnImage: false,
  284. columnSortable: false,
  285. sortLv: 0,
  286. status: true,
  287. fixed: '',
  288. columnWidth: 100,
  289. },
  290. {
  291. userId: this.$store.state.user.name,
  292. functionId: 5011,
  293. serialNumber: '5011Table5LaborSetupTime',
  294. tableId: "5011Table5",
  295. tableName: "报价工艺信息",
  296. columnProp: 'laborSetupTime',
  297. headerAlign: "center",
  298. align: "right",
  299. columnLabel: '人工调机时间',
  300. columnHidden: false,
  301. columnImage: false,
  302. columnSortable: false,
  303. sortLv: 0,
  304. status: true,
  305. fixed: '',
  306. columnWidth: 100,
  307. },
  308. {
  309. userId: this.$store.state.user.name,
  310. functionId: 5011,
  311. serialNumber: '5011Table5LaborCycleTime',
  312. tableId: "5011Table5",
  313. tableName: "报价工艺信息",
  314. columnProp: 'laborCycleTime',
  315. headerAlign: "center",
  316. align: "right",
  317. columnLabel: '人工处理时间',
  318. columnHidden: false,
  319. columnImage: false,
  320. columnSortable: false,
  321. sortLv: 0,
  322. status: true,
  323. fixed: '',
  324. columnWidth: 100,
  325. },
  326. {
  327. userId: this.$store.state.user.name,
  328. functionId: 5011,
  329. serialNumber: '5011Table5LaborRunFactor',
  330. tableId: "5011Table5",
  331. tableName: "报价工艺信息",
  332. columnProp: 'laborRunFactor',
  333. headerAlign: "center",
  334. align: "right",
  335. columnLabel: '人工单位产出',
  336. columnHidden: false,
  337. columnImage: false,
  338. columnSortable: false,
  339. sortLv: 0,
  340. status: true,
  341. fixed: '',
  342. columnWidth: 120,
  343. },
  344. {
  345. userId: this.$store.state.user.name,
  346. functionId: 5011,
  347. serialNumber: '5011Table5RunTimeDesc',
  348. tableId: "5011Table5",
  349. tableName: "报价工艺信息",
  350. columnProp: 'runTimeDesc',
  351. headerAlign: "center",
  352. align: "center",
  353. columnLabel: '产出单位',
  354. columnHidden: false,
  355. columnImage: false,
  356. columnSortable: false,
  357. sortLv: 0,
  358. status: true,
  359. fixed: '',
  360. columnWidth: 100,
  361. },
  362. {
  363. userId: this.$store.state.user.name,
  364. functionId: 5011,
  365. serialNumber: '5011Table5EfficiencyFactor',
  366. tableId: "5011Table5",
  367. tableName: "报价工艺信息",
  368. columnProp: 'efficiencyFactor',
  369. headerAlign: "center",
  370. align: "right",
  371. columnLabel: '效率%',
  372. columnHidden: false,
  373. columnImage: false,
  374. columnSortable: false,
  375. sortLv: 0,
  376. status: true,
  377. fixed: '',
  378. columnWidth: 100,
  379. },
  380. {
  381. userId: this.$store.state.user.name,
  382. functionId: 5011,
  383. serialNumber: '5011Table5ResourceNum',
  384. tableId: "5011Table5",
  385. tableName: "报价工艺信息",
  386. columnProp: 'resourceNum',
  387. headerAlign: "center",
  388. align: "right",
  389. columnLabel: '机台数量',
  390. columnHidden: false,
  391. columnImage: false,
  392. columnSortable: false,
  393. sortLv: 0,
  394. status: true,
  395. fixed: '',
  396. columnWidth: 100,
  397. },
  398. {
  399. userId: this.$store.state.user.name,
  400. functionId: 5011,
  401. serialNumber: '5011Table5LaborClassCost',
  402. tableId: "5011Table5",
  403. tableName: "报价工艺信息",
  404. columnProp: 'laborClassCost',
  405. headerAlign: "center",
  406. align: "right",
  407. columnLabel: '单位人工成本-生产',
  408. columnHidden: false,
  409. columnImage: false,
  410. columnSortable: false,
  411. sortLv: 0,
  412. status: true,
  413. fixed: '',
  414. columnWidth: 120,
  415. },
  416. {
  417. userId: this.$store.state.user.name,
  418. functionId: 5011,
  419. serialNumber: '5011Table5SetupLaborClassCost',
  420. tableId: "5011Table5",
  421. tableName: "报价工艺信息",
  422. columnProp: 'setupLaborClassCost',
  423. headerAlign: "center",
  424. align: "right",
  425. columnLabel: '单位人工成本-调机',
  426. columnHidden: false,
  427. columnImage: false,
  428. columnSortable: false,
  429. sortLv: 0,
  430. status: true,
  431. fixed: '',
  432. columnWidth: 120,
  433. },
  434. {
  435. userId: this.$store.state.user.name,
  436. functionId: 5011,
  437. serialNumber: '5011Table5WorkCenterCost',
  438. tableId: "5011Table5",
  439. tableName: "报价工艺信息",
  440. columnProp: 'workCenterCost',
  441. headerAlign: "center",
  442. align: "right",
  443. columnLabel: '单位机器成本',
  444. columnHidden: false,
  445. columnImage: false,
  446. columnSortable: false,
  447. sortLv: 0,
  448. status: true,
  449. fixed: '',
  450. columnWidth: 120,
  451. },
  452. {
  453. userId: this.$store.state.user.name,
  454. functionId: 5011,
  455. serialNumber: '5011Table5ManuCost',
  456. tableId: "5011Table5",
  457. tableName: "报价工艺信息",
  458. columnProp: 'manuCost',
  459. headerAlign: "center",
  460. align: "right",
  461. columnLabel: '单位制造费用成本',
  462. columnHidden: false,
  463. columnImage: false,
  464. columnSortable: false,
  465. sortLv: 0,
  466. status: true,
  467. fixed: '',
  468. columnWidth: 120,
  469. },
  470. {
  471. userId: this.$store.state.user.name,
  472. functionId: 5011,
  473. serialNumber: '5011Table5TotalMachCost',
  474. tableId: "5011Table5",
  475. tableName: "报价工艺信息",
  476. columnProp: 'totalMachCost',
  477. headerAlign: "center",
  478. align: "right",
  479. columnLabel: '机器成本',
  480. columnHidden: false,
  481. columnImage: false,
  482. columnSortable: false,
  483. sortLv: 0,
  484. status: true,
  485. fixed: '',
  486. columnWidth: 140,
  487. },{
  488. userId: this.$store.state.user.name,
  489. functionId: 5011,
  490. serialNumber: '5011Table5TotalManCost',
  491. tableId: "5011Table5",
  492. tableName: "报价工艺信息",
  493. columnProp: 'totalManCost',
  494. headerAlign: "center",
  495. align: "right",
  496. columnLabel: '制造成本',
  497. columnHidden: false,
  498. columnImage: false,
  499. columnSortable: false,
  500. sortLv: 0,
  501. status: true,
  502. fixed: '',
  503. columnWidth: 140,
  504. },{
  505. userId: this.$store.state.user.name,
  506. functionId: 5011,
  507. serialNumber: '5011Table5TotalLaborCost',
  508. tableId: "5011Table5",
  509. tableName: "报价工艺信息",
  510. columnProp: 'totalLaborCost',
  511. headerAlign: "center",
  512. align: "right",
  513. columnLabel: '人工成本',
  514. columnHidden: false,
  515. columnImage: false,
  516. columnSortable: false,
  517. sortLv: 0,
  518. status: true,
  519. fixed: '',
  520. columnWidth: 140,
  521. },{
  522. userId: this.$store.state.user.name,
  523. functionId: 5011,
  524. serialNumber: '5011Table5TotalCost',
  525. tableId: "5011Table5",
  526. tableName: "报价工艺信息",
  527. columnProp: 'totalCost',
  528. headerAlign: "center",
  529. align: "right",
  530. columnLabel: '成本小计',
  531. columnHidden: false,
  532. columnImage: false,
  533. columnSortable: false,
  534. sortLv: 0,
  535. status: true,
  536. fixed: 'right',
  537. columnWidth: 120,
  538. },
  539. ],
  540. props:{
  541. children: 'list',
  542. label: (data,node)=>{
  543. return `${data.partNo}-${data.engChgLevel}-${data.alternativeNo}-${data.bomType}`;
  544. },
  545. },
  546. queryTreeLoading:false,
  547. versionVisible:false,
  548. versionList:[],
  549. alternativeList:[],
  550. routing:{
  551. }
  552. }
  553. },
  554. methods:{
  555. handleQueryQuoteDetailBomTree(){
  556. let params = {
  557. id: this.quoteDetail.id,
  558. }
  559. this.queryTreeLoading = true;
  560. queryQuoteDetailBomTree(params).then(({data})=>{
  561. if (data && data.code === 0){
  562. this.treeData = data.rows;
  563. if (this.treeData.length > 0){
  564. this.$nextTick(()=>{
  565. this.$refs.tree.setCurrentKey(this.treeData[0].id);
  566. this.handleQueryDetailRouting();
  567. })
  568. }
  569. this.queryTreeLoading = false;
  570. }else {
  571. this.$message.warning(data.msg);
  572. this.queryTreeLoading = false;
  573. }
  574. }).catch((error)=>{
  575. this.$message.error(error);
  576. })
  577. },
  578. nodeClick(data){
  579. this.handleQueryDetailRouting();
  580. },
  581. handleQueryDetailRouting(){
  582. let node = this.$refs.tree.getCurrentNode();
  583. let params = {
  584. treeId:node.id,
  585. quoteDetailId: this.quoteDetail.id,
  586. isAllRouting: this.isAllRouting,
  587. }
  588. this.queryLoading = true;
  589. queryQuoteDetailRouting(params).then(({data})=>{
  590. if (data && data.code === 0){
  591. this.dataList = data.rows;
  592. }else {
  593. this.$message.warning(data.msg);
  594. }
  595. this.queryLoading = false;
  596. }).catch((error)=>{
  597. this.$message.error(error);
  598. this.queryLoading = false;
  599. })
  600. },
  601. handleChangeVersion(){
  602. let node = this.$refs.tree.getCurrentNode();
  603. if (this.treeData.length === 0){
  604. this.$message.warning("未维护BOM结构")
  605. return;
  606. }
  607. if (node){
  608. this.routing = {
  609. partNo: node.partNo,
  610. buNo: node.buNo,
  611. site: node.site,
  612. routingType: node.bomType,
  613. routingRevision: node.engChgLevel,
  614. alternativeNo: node.alternativeNo,
  615. }
  616. }
  617. this.handleQueryVersionList();
  618. this.versionVisible = true;
  619. },
  620. versionRowStyle({row}){
  621. if (row.routingRevision === this.routing.routingRevision && row.routingType === this.routing.routingType){
  622. return { 'background-color': '#E8F7F6' };
  623. }
  624. },
  625. handleQueryVersionList(){
  626. let node = this.$refs.tree.getCurrentNode();
  627. let params = {
  628. treeId: node.id,
  629. }
  630. queryQuoteDetailRoutingVersion(params).then(({data})=>{
  631. if (data && data.code === 0){
  632. this.versionList = data.rows;
  633. this.handleQueryAlternativeList();
  634. }else {
  635. this.$message.warning(data.msg);
  636. }
  637. }).catch((error)=>{
  638. this.$message.error(error);
  639. })
  640. },
  641. handleQueryAlternativeList(){
  642. let params = {
  643. ...this.routing,
  644. }
  645. queryQuoteDetailRoutingAlternative(params).then(({data})=>{
  646. if (data && data.code === 0){
  647. this.alternativeList = data.rows;
  648. }else {
  649. this.$message.warning(data.msg);
  650. }
  651. }).catch((error)=>{
  652. this.$message.error(error);
  653. })
  654. },
  655. versionRowClick(row){
  656. this.routing.routingType = row.routingType;
  657. this.routing.routingRevision = row.routingRevision;
  658. this.handleQueryAlternativeList();
  659. },
  660. alternativeRowStyle({row}){
  661. if (this.dataList.length > 0){
  662. if (this.routing.alternativeNo === row.alternativeNo && this.routing.routingRevision === row.routingRevision && this.routing.routingType === row.routingType){
  663. return { 'background-color': '#E8F7F6' };
  664. }
  665. }
  666. },
  667. changeRouting(row){
  668. let params = {
  669. quoteId: this.quoteDetail.quoteId,
  670. quoteDetailId: this.quoteDetail.id,
  671. quoteDetailItemNo:this.quoteDetail.itemNo,
  672. versionNo: this.quoteDetail.versionNo,
  673. site: row.site,
  674. partNo: row.partNo,
  675. buNo: "*",
  676. quoteNo: this.quoteDetail.quoteNo,
  677. routingType: row.routingType,
  678. routingRevision: row.routingRevision,
  679. alternativeNo: row.alternativeNo,
  680. treeId: this.$refs.tree.getCurrentNode().id,
  681. createBy: this.$store.state.user.name,
  682. }
  683. changeQuoteDetailRoutingChange(params).then(({data})=>{
  684. if (data && data.code === 0){
  685. this.$message.success(data.msg);
  686. this.versionVisible = false;
  687. this.handleQueryDetailRouting();
  688. }else {
  689. this.$message.warning(data.msg);
  690. }
  691. }).catch((error)=>{
  692. this.$message.error(error)
  693. })
  694. },
  695. handleJumpToRouting(row){
  696. if (this.$router.resolve('part-routingManagement').resolved.name === '404') {
  697. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
  698. } else {
  699. this.$emit('close')
  700. let params = {
  701. name: "part-routingManagement",
  702. params: {
  703. type:'quote',
  704. partNo:row.partNo,
  705. routingType:row.routingType,
  706. routingRevision:row.routingRevision,
  707. alternativeNo:row.alternativeNo,
  708. }
  709. }
  710. this.$router.push(params)
  711. }
  712. }
  713. },
  714. created() {
  715. if (this.quoteDetail && this.quoteDetail.id){
  716. this.handleQueryQuoteDetailBomTree();
  717. }
  718. },
  719. watch:{
  720. 'quoteDetail.id'(newVal,oldVal){
  721. this.handleQueryQuoteDetailBomTree();
  722. },
  723. isAllRouting(newVal,oldVal){
  724. this.handleQueryDetailRouting();
  725. },
  726. }
  727. }
  728. </script>
  729. <template>
  730. <div>
  731. <div style="margin-bottom: 10px">
  732. <el-link style="margin-right: 20px;cursor:pointer;" @click="handleChangeVersion" v-if="quoteDetail.status === '草稿'">切换版本</el-link>
  733. <el-checkbox v-model="isAllRouting">全级Routing结构</el-checkbox>
  734. </div>
  735. <el-container>
  736. <el-aside width="300px" v-loading="queryTreeLoading">
  737. <el-tree
  738. :data="treeData"
  739. :props="props"
  740. :default-expand-all="true"
  741. :expand-on-click-node="false"
  742. node-key="id"
  743. highlight-current
  744. @node-click="nodeClick" ref="tree">
  745. </el-tree>
  746. </el-aside>
  747. <el-main style="padding: 0">
  748. <el-table :data="dataList" v-loading="queryLoading" border style="width: 100%" :height="420">
  749. <el-table-column
  750. v-for="(item,index) in columns" :key="index"
  751. :sortable="item.columnSortable"
  752. :prop="item.columnProp"
  753. :header-align="item.headerAlign"
  754. :show-overflow-tooltip="item.showOverflowTooltip"
  755. :align="item.align"
  756. :fixed="item.fixed===''?false:item.fixed"
  757. :min-width="item.columnWidth"
  758. :label="item.columnLabel">
  759. <template slot-scope="scope">
  760. <template v-if="item.columnProp === 'partNo'">
  761. <el-link @click="handleJumpToRouting(scope.row)">{{ scope.row[item.columnProp] }}</el-link>
  762. </template>
  763. <template v-else>
  764. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  765. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  766. </template>
  767. </template>
  768. </el-table-column>
  769. </el-table>
  770. </el-main>
  771. </el-container>
  772. <el-dialog title="切换版本" :visible.sync="versionVisible" width="1000px" v-drag :close-on-click-modal="false" append-to-body>
  773. <el-table :data="versionList" :row-style="versionRowStyle" ref="routingVersionTable" style="margin-top: 8px" border :height="240" @row-click="versionRowClick">
  774. <el-table-column label="物料编码" prop="partNo" header-align="center" align="center" show-overflow-tooltip min-width="140"/>
  775. <el-table-column label="物料描述" prop="partDesc" header-align="center" align="left" show-overflow-tooltip min-width="200"/>
  776. <el-table-column label="版本" prop="routingRevision" header-align="center" align="center" show-overflow-tooltip min-width="60"/>
  777. <el-table-column label="类型" prop="routingType" header-align="center" align="center" show-overflow-tooltip min-width="100"/>
  778. </el-table>
  779. <el-table :data="alternativeList" :row-style="alternativeRowStyle" ref="routingAlternativeTable" border :height="240" style="margin-top: 8px">
  780. <el-table-column label="物料编码" prop="partNo" header-align="center" align="center" show-overflow-tooltip min-width="140"/>
  781. <el-table-column label="物料描述" prop="partDesc" header-align="center" align="left" show-overflow-tooltip min-width="200"/>
  782. <el-table-column label="版本" prop="routingRevision" header-align="center" align="center" show-overflow-tooltip min-width="60"/>
  783. <el-table-column label="替代编码" prop="alternativeNo" header-align="center" align="left" show-overflow-tooltip min-width="60"/>
  784. <el-table-column label="类型" prop="routingType" header-align="center" align="center" show-overflow-tooltip min-width="100"/>
  785. <el-table-column label="操作" min-width="80" header-align="center" align="center">
  786. <template slot-scope="{row,$index}">
  787. <a @click="changeRouting(row)">选择</a>
  788. </template>
  789. </el-table-column>
  790. </el-table>
  791. </el-dialog>
  792. </div>
  793. </template>
  794. <style scoped>
  795. </style>