plm前端
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.

723 lines
24 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <script>
  2. import {
  3. getRoutingTreeStructure, searchQuoteRoutingAlternativeNo, searchQuoteRoutingDetailList,
  4. searchQuoteRoutingList,
  5. updateQuoteRoutingList
  6. } from "../../../../../api/quotation/quoteOfRouting";
  7. import {
  8. searchQuoteBOMAlternativeNo,
  9. searchQuoteBomList,
  10. searchQuoteBOMVersion
  11. } from "../../../../../api/quotation/quoteOfBom";
  12. import {Decimal} from "decimal.js";
  13. export default {
  14. name: "quoteRouting",
  15. props:{
  16. detail:{
  17. type:Object,
  18. request:true,
  19. },
  20. height:{
  21. type:Number,
  22. default:400,
  23. },
  24. loadingStatus:{
  25. type:Boolean,
  26. default:false,
  27. },
  28. allSearchFlag:{
  29. type:Boolean,
  30. default:false,
  31. },
  32. },
  33. computed:{
  34. RoutingAllSearchFlag:{
  35. get(){
  36. return this.allSearchFlag;
  37. },
  38. set(val){
  39. this.$emit("update:allSearchFlag",val)
  40. }
  41. }
  42. },
  43. data(){
  44. return{
  45. dataListLoading:false,
  46. routingAlternativeList:[],
  47. routingVersionList:[],
  48. handoffVersion:false,
  49. treeLoading:false,
  50. routingTreeStructure:[],
  51. routingProps:{
  52. label:'label',
  53. value:'value',
  54. children:'list'
  55. },
  56. selectRouting:[],
  57. routingDetailList:[],
  58. columnDetailList:[
  59. {
  60. userId: this.$store.state.user.name,
  61. functionId: 102003,
  62. serialNumber: '102003Table5OperationNo',
  63. tableId: "102003Table5",
  64. tableName: "报价工艺信息",
  65. columnProp: 'operationNo',
  66. headerAlign: "center",
  67. align: "center",
  68. columnLabel: '工序号',
  69. columnHidden: false,
  70. columnImage: false,
  71. columnSortable: false,
  72. sortLv: 0,
  73. status: true,
  74. fixed: '',
  75. columnWidth: 60,
  76. },{
  77. userId: this.$store.state.user.name,
  78. functionId: 102003,
  79. serialNumber: '102003Table5OperationName',
  80. tableId: "102003Table5",
  81. tableName: "报价工艺信息",
  82. columnProp: 'operationName',
  83. headerAlign: "center",
  84. align: "left",
  85. columnLabel: '工序名称',
  86. columnHidden: false,
  87. columnImage: false,
  88. columnSortable: false,
  89. sortLv: 0,
  90. status: true,
  91. fixed: '',
  92. columnWidth: 100,
  93. },{
  94. userId: this.$store.state.user.name,
  95. functionId: 102003,
  96. serialNumber: '102003Table5PartNo',
  97. tableId: "102003Table5",
  98. tableName: "报价工艺信息",
  99. columnProp: 'partNo',
  100. headerAlign: "center",
  101. align: "left",
  102. columnLabel: '物料编码',
  103. columnHidden: false,
  104. columnImage: false,
  105. columnSortable: false,
  106. sortLv: 0,
  107. status: true,
  108. fixed: '',
  109. columnWidth: 100,
  110. },{
  111. userId: this.$store.state.user.name,
  112. functionId: 102003,
  113. serialNumber: '102003Table5PartDesc',
  114. tableId: "102003Table5",
  115. tableName: "报价工艺信息",
  116. columnProp: 'partDesc',
  117. headerAlign: "center",
  118. align: "left",
  119. columnLabel: '物料描述',
  120. columnHidden: false,
  121. columnImage: false,
  122. columnSortable: false,
  123. sortLv: 0,
  124. status: true,
  125. fixed: '',
  126. columnWidth: 200,
  127. },{
  128. userId: this.$store.state.user.name,
  129. functionId: 102003,
  130. serialNumber: '102003Table5Version',
  131. tableId: "102003Table5",
  132. tableName: "报价工艺信息",
  133. columnProp: 'version',
  134. headerAlign: "center",
  135. align: "center",
  136. columnLabel: '版本',
  137. columnHidden: false,
  138. columnImage: false,
  139. columnSortable: false,
  140. sortLv: 0,
  141. status: true,
  142. fixed: '',
  143. columnWidth: 80,
  144. },{
  145. userId: this.$store.state.user.name,
  146. functionId: 102003,
  147. serialNumber: '102003Table5AlternativeNo',
  148. tableId: "102003Table5",
  149. tableName: "报价工艺信息",
  150. columnProp: 'alternativeNo',
  151. headerAlign: "center",
  152. align: "left",
  153. columnLabel: '替代编码',
  154. columnHidden: false,
  155. columnImage: false,
  156. columnSortable: false,
  157. sortLv: 0,
  158. status: true,
  159. fixed: '',
  160. columnWidth: 100,
  161. },{
  162. userId: this.$store.state.user.name,
  163. functionId: 102003,
  164. serialNumber: '102003Table5AlternativeDesc',
  165. tableId: "102003Table5",
  166. tableName: "报价工艺信息",
  167. columnProp: 'alternativeDesc',
  168. headerAlign: "center",
  169. align: "left",
  170. columnLabel: '替代描述',
  171. columnHidden: false,
  172. columnImage: false,
  173. columnSortable: false,
  174. sortLv: 0,
  175. status: true,
  176. fixed: '',
  177. columnWidth: 120,
  178. },{
  179. userId: this.$store.state.user.name,
  180. functionId: 102003,
  181. serialNumber: '102003Table5WorkCenterNo',
  182. tableId: "102003Table5",
  183. tableName: "报价工艺信息",
  184. columnProp: 'workCenterNo',
  185. headerAlign: "center",
  186. align: "left",
  187. columnLabel: '加工中心编码',
  188. columnHidden: false,
  189. columnImage: false,
  190. columnSortable: false,
  191. sortLv: 0,
  192. status: true,
  193. fixed: '',
  194. columnWidth: 100,
  195. },{
  196. userId: this.$store.state.user.name,
  197. functionId: 102003,
  198. serialNumber: '102003Table5WorkCenterDesc',
  199. tableId: "102003Table5",
  200. tableName: "报价工艺信息",
  201. columnProp: 'workCenterDesc',
  202. headerAlign: "center",
  203. align: "left",
  204. columnLabel: '加工中心名称',
  205. columnHidden: false,
  206. columnImage: false,
  207. columnSortable: false,
  208. sortLv: 0,
  209. status: true,
  210. fixed: '',
  211. columnWidth: 200,
  212. },{
  213. userId: this.$store.state.user.name,
  214. functionId: 102003,
  215. serialNumber: '102003Table5EfficiencyFactor',
  216. tableId: "102003Table5",
  217. tableName: "报价工艺信息",
  218. columnProp: 'efficiencyFactor',
  219. headerAlign: "center",
  220. align: "right",
  221. columnLabel: '效率%',
  222. columnHidden: false,
  223. columnImage: false,
  224. columnSortable: false,
  225. sortLv: 0,
  226. status: true,
  227. fixed: '',
  228. columnWidth: 100,
  229. },{
  230. userId: this.$store.state.user.name,
  231. functionId: 102003,
  232. serialNumber: '102003Table5MachRunFactor',
  233. tableId: "102003Table5",
  234. tableName: "报价工艺信息",
  235. columnProp: 'machRunFactor',
  236. headerAlign: "center",
  237. align: "right",
  238. columnLabel: '机器运行速度',
  239. columnHidden: false,
  240. columnImage: false,
  241. columnSortable: false,
  242. sortLv: 0,
  243. status: true,
  244. fixed: '',
  245. columnWidth: 100,
  246. },{
  247. userId: this.$store.state.user.name,
  248. functionId: 102003,
  249. serialNumber: '102003Table5MachSetupTime',
  250. tableId: "102003Table5",
  251. tableName: "报价工艺信息",
  252. columnProp: 'machSetupTime',
  253. headerAlign: "center",
  254. align: "right",
  255. columnLabel: '调机时长',
  256. columnHidden: false,
  257. columnImage: false,
  258. columnSortable: false,
  259. sortLv: 0,
  260. status: true,
  261. fixed: '',
  262. columnWidth: 100,
  263. },{
  264. userId: this.$store.state.user.name,
  265. functionId: 102003,
  266. serialNumber: '102003Table5RunTimeDesc',
  267. tableId: "102003Table5",
  268. tableName: "报价工艺信息",
  269. columnProp: 'runTimeDesc',
  270. headerAlign: "center",
  271. align: "center",
  272. columnLabel: '产出单位',
  273. columnHidden: false,
  274. columnImage: false,
  275. columnSortable: false,
  276. sortLv: 0,
  277. status: true,
  278. fixed: '',
  279. columnWidth: 100,
  280. },{
  281. userId: this.$store.state.user.name,
  282. functionId: 102003,
  283. serialNumber: '102003Table5LaborRunFactor',
  284. tableId: "102003Table5",
  285. tableName: "报价工艺信息",
  286. columnProp: 'laborRunFactor',
  287. headerAlign: "center",
  288. align: "right",
  289. columnLabel: '人工生产速度',
  290. columnHidden: false,
  291. columnImage: false,
  292. columnSortable: false,
  293. sortLv: 0,
  294. status: true,
  295. fixed: '',
  296. columnWidth: 100,
  297. },{
  298. userId: this.$store.state.user.name,
  299. functionId: 102003,
  300. serialNumber: '102003Table5LaborSetupTime',
  301. tableId: "102003Table5",
  302. tableName: "报价工艺信息",
  303. columnProp: 'laborSetupTime',
  304. headerAlign: "center",
  305. align: "right",
  306. columnLabel: '人工调机时长',
  307. columnHidden: false,
  308. columnImage: false,
  309. columnSortable: false,
  310. sortLv: 0,
  311. status: true,
  312. fixed: '',
  313. columnWidth: 100,
  314. },{
  315. userId: this.$store.state.user.name,
  316. functionId: 102003,
  317. serialNumber: '102003Table5CrewSize',
  318. tableId: "102003Table5",
  319. tableName: "报价工艺信息",
  320. columnProp: 'crewSize',
  321. headerAlign: "center",
  322. align: "right",
  323. columnLabel: '生产过程人数',
  324. columnHidden: false,
  325. columnImage: false,
  326. columnSortable: false,
  327. sortLv: 0,
  328. status: true,
  329. fixed: '',
  330. columnWidth: 100,
  331. },{
  332. userId: this.$store.state.user.name,
  333. functionId: 102003,
  334. serialNumber: '102003Table5SetupCrewSize',
  335. tableId: "102003Table5",
  336. tableName: "报价工艺信息",
  337. columnProp: 'setupCrewSize',
  338. headerAlign: "center",
  339. align: "right",
  340. columnLabel: '调机过程人数',
  341. columnHidden: false,
  342. columnImage: false,
  343. columnSortable: false,
  344. sortLv: 0,
  345. status: true,
  346. fixed: '',
  347. columnWidth: 100,
  348. },{
  349. userId: this.$store.state.user.name,
  350. functionId: 102003,
  351. serialNumber: '102003Table5LaborClassNo',
  352. tableId: "102003Table5",
  353. tableName: "报价工艺信息",
  354. columnProp: 'laborClassNo',
  355. headerAlign: "center",
  356. align: "right",
  357. columnLabel: '人员等级',
  358. columnHidden: false,
  359. columnImage: false,
  360. columnSortable: false,
  361. sortLv: 0,
  362. status: true,
  363. fixed: '',
  364. columnWidth: 100,
  365. },{
  366. userId: this.$store.state.user.name,
  367. functionId: 102003,
  368. serialNumber: '102003Table5SetupLaborClassNo',
  369. tableId: "102003Table5",
  370. tableName: "报价工艺信息",
  371. columnProp: 'setupLaborClassNo',
  372. headerAlign: "center",
  373. align: "right",
  374. columnLabel: '调机人员等级',
  375. columnHidden: false,
  376. columnImage: false,
  377. columnSortable: false,
  378. sortLv: 0,
  379. status: true,
  380. fixed: '',
  381. columnWidth: 100,
  382. },{
  383. userId: this.$store.state.user.name,
  384. functionId: 102003,
  385. serialNumber: '102003Table5QuoteUnitCost',
  386. tableId: "102003Table5",
  387. tableName: "报价工艺信息",
  388. columnProp: 'quoteUnitCost',
  389. headerAlign: "center",
  390. align: "left",
  391. columnLabel: '单位报价成本',
  392. columnHidden: false,
  393. columnImage: false,
  394. columnSortable: false,
  395. sortLv: 0,
  396. status: true,
  397. fixed: '',
  398. columnWidth: 100,
  399. },
  400. ],
  401. versionData:{},
  402. }
  403. },
  404. methods:{
  405. nodeClick(val){
  406. this.selectRouting = val.value.split("-")
  407. this.$nextTick(()=>{
  408. this.$refs.tree.setCurrentKey(`${this.selectRouting[0]}-${this.selectRouting[1]}-${this.selectRouting[2]}-${this.selectRouting[3]}-${this.selectRouting[4]}-${this.selectRouting[5]}`)
  409. })
  410. this.searchQuoteRoutingList()
  411. },
  412. getRoutingTreeStructure(){
  413. let params = {
  414. site:this.detail.site,
  415. testPartNo:this.detail.productNo,
  416. quoteDetailId:this.detail.quotationDetailId
  417. }
  418. this.treeLoading = true;
  419. getRoutingTreeStructure(params).then(({data})=>{
  420. if (data && data.code === 0){
  421. this.routingTreeStructure = data.rows;
  422. this.$nextTick(()=>{
  423. this.$refs.tree.setCurrentKey(`${this.selectRouting[0]}-${this.selectRouting[1]}-${this.selectRouting[2]}-${this.selectRouting[3]}-${this.selectRouting[4]}-${this.selectRouting[5]}`)
  424. })
  425. this.searchQuoteRoutingList();
  426. }else {
  427. this.$message.warning(data.msg)
  428. }
  429. this.treeLoading = false;
  430. this.$emit("update:loadingStatus",this.treeLoading)
  431. }).catch((error)=>{
  432. this.$message.error(error)
  433. this.treeLoading = false;
  434. this.$emit("update:loadingStatus",this.treeLoading)
  435. })
  436. },
  437. changeSelect(){
  438. if (this.selectRouting.length === 0){
  439. this.updateQuoteRoutingList();
  440. return
  441. }
  442. this.$confirm('此操作将更换工艺信息, 是否继续?', '提示', {
  443. confirmButtonText: '确定',
  444. cancelButtonText: '取消',
  445. type: 'warning'
  446. }).then(() => {
  447. this.updateQuoteRoutingList();
  448. }).catch(() => {
  449. this.selectRouting = JSON.parse(JSON.stringify(this.copyRouting))
  450. this.$nextTick(()=>{
  451. this.$refs.tree.setCurrentKey(`${this.selectRouting[0]}-${this.selectRouting[1]}-${this.selectRouting[2]}-${this.selectRouting[3]}-${this.selectRouting[4]}-${this.selectRouting[5]}`)
  452. })
  453. });
  454. },
  455. updateQuoteRoutingList(){
  456. let params = {
  457. site:this.$store.state.user.site,
  458. testPartNo: this.detail.productNo,
  459. version:this.selectRouting[0],
  460. routingType:this.selectRouting[1],
  461. alternativeNo:this.selectRouting[2],
  462. quoteDetailId:this.detail.quotationDetailId
  463. }
  464. updateQuoteRoutingList(params).then(({data})=>{
  465. if (data && data.code === 0){
  466. this.$message.success(data.msg)
  467. this.searchQuoteRoutingList();
  468. }else {
  469. this.$message.warning(data.msg)
  470. }
  471. }).catch((error)=>{
  472. this.$message.error(error)
  473. })
  474. },
  475. setSelectRouting(val){
  476. if (val.length === 0){
  477. this.getRoutingTreeStructure();
  478. return
  479. }
  480. this.selectRouting = JSON.parse(JSON.stringify(val))
  481. this.getRoutingTreeStructure();
  482. },
  483. searchQuoteRoutingList(){
  484. let params = {
  485. site:this.$store.state.user.site,
  486. partNo: this.selectRouting[3],
  487. version:this.selectRouting[0],
  488. routingType:this.selectRouting[2],
  489. alternativeNo:this.selectRouting[1],
  490. id:this.selectRouting[4],
  491. quoteDetailId:this.detail.quotationDetailId
  492. }
  493. this.routingDetailList = [];
  494. this.dataListLoading = true;
  495. if (this.RoutingAllSearchFlag){
  496. searchQuoteRoutingList(params).then(({data})=>{
  497. this.dataListLoading = false;
  498. if (data && data.code === 0){
  499. this.routingDetailList = data.rows
  500. this.computedQuoteRoutingCost();
  501. }else {
  502. this.$message.warning(data.msg)
  503. }
  504. this.$emit("update:loadingStatus",this.dataListLoading)
  505. }).catch((error)=>{
  506. this.dataListLoading = false;
  507. this.$emit("update:loadingStatus",this.dataListLoading)
  508. this.$message.error(error)
  509. })
  510. }else {
  511. searchQuoteRoutingDetailList(params).then(({data})=>{
  512. this.dataListLoading = false;
  513. if (data && data.code === 0){
  514. this.routingDetailList = data.rows
  515. this.computedQuoteRoutingCost();
  516. }else {
  517. this.$message.warning(data.msg)
  518. }
  519. this.$emit("update:loadingStatus",this.dataListLoading)
  520. }).catch((error)=>{
  521. this.dataListLoading = false;
  522. this.$emit("update:loadingStatus",this.dataListLoading)
  523. this.$message.error(error)
  524. })
  525. }
  526. },
  527. computedQuoteRoutingCost(){
  528. for (let i = 0; i < this.routingDetailList.length; i++) {
  529. this.setRunTimeDesc(i);
  530. let detail = this.routingDetailList[i];
  531. // detail.machineCost 机器成本
  532. // detail.laborCosts 人工成本
  533. detail.laborCosts = new Decimal(detail.laborClassCost)
  534. }
  535. },
  536. setRunTimeDesc(i){
  537. switch (this.routingDetailList[i].runTimeCode){
  538. case 'A':
  539. this.routingDetailList[i].runTimeDesc = '单位/小时'
  540. break
  541. case 'B':
  542. this.routingDetailList[i].runTimeDesc = '小时/单位'
  543. break
  544. case 'C':
  545. this.routingDetailList[i].runTimeDesc = '小时'
  546. break
  547. default:
  548. this.routingDetailList[i].runTimeDesc = this.routingDetailList[i].runTimeCode;
  549. }
  550. },
  551. alternativeRowStyle({row}){
  552. if (row.version === this.versionData.version && row.routingType === this.versionData.routingType && row.alternativeNo === this.versionData.alternativeNo){
  553. return {'background-color': '#E8F7F6', cursor: 'pointer'}
  554. }
  555. },
  556. versionRowStyle({row}){
  557. if (row.version === this.versionData.version && row.routingType === this.versionData.routingType){
  558. return {'background-color': '#E8F7F6', cursor: 'pointer'}
  559. }
  560. },
  561. clickAlternative(row){
  562. let params = {
  563. id:this.selectRouting[4],
  564. site:this.$store.state.user.site,
  565. partNo: row.partNo,
  566. version:row.version,
  567. routingType:row.routingType,
  568. alternativeNo:row.alternativeNo,
  569. quoteDetailId:this.detail.quotationDetailId
  570. }
  571. updateQuoteRoutingList(params).then(({data})=>{
  572. if (data && data.code === 0){
  573. this.$message.success(data.msg)
  574. this.searchQuoteRoutingList();
  575. this.handoffVersion = false
  576. }else {
  577. this.$message.warning(data.msg)
  578. }
  579. }).catch((error)=>{
  580. this.$message.error(error)
  581. })
  582. },
  583. clickVersionCheck(){
  584. this.routingAlternativeList = []
  585. this.routingVersionList = []
  586. this.versionData = {};
  587. this.searchQuoteRoutingVersion();
  588. },
  589. searchQuoteRoutingVersion(){
  590. let params = {
  591. site:this.detail.site,
  592. quoteDetailId:this.detail.quotationDetailId,
  593. partNo:this.selectRouting[3],
  594. id:this.selectRouting[4]
  595. }
  596. this.routingVersionList = [];
  597. searchQuoteRoutingAlternativeNo(params).then(({data})=>{
  598. if (data && data.code === 0){
  599. this.routingVersionList = data.rows;
  600. this.handoffVersion = true;
  601. if (data.row !== undefined && data.row !== null){
  602. this.versionData = {
  603. partNo:data.row.partNo,
  604. site:data.row.site,
  605. version:data.row.version,
  606. routingType:data.row.routingType,
  607. alternativeNo:data.row.alternativeNo
  608. }
  609. }else {
  610. this.selectionVersion();//默认选择项
  611. }
  612. // 查询替代
  613. this.searchRoutingAlternative(this.versionData);
  614. }else {
  615. this.$message.warning(data.msg)
  616. }
  617. }).catch((error)=>{
  618. this.$message.error(error)
  619. })
  620. },
  621. selectionVersion(){
  622. for (let i = 0; i < this.routingVersionList.length; i++) {
  623. let routingVersion = this.routingVersionList[i]
  624. if (routingVersion.version === this.versionData.version && routingVersion.routingType === this.versionData.routingType){
  625. this.versionData = routingVersion;
  626. return
  627. }
  628. }
  629. },
  630. searchRoutingAlternative(row){
  631. let params = {
  632. site:this.detail.site,
  633. quoteDetailId:this.detail.quotationDetailId,
  634. partNo:row.partNo,
  635. version:row.version,
  636. routingType:row.routingType,
  637. alternativeNo:row.alternativeNo,
  638. }
  639. searchQuoteRoutingAlternativeNo(params).then(({data})=>{
  640. if (data && data.code === 0){
  641. this.routingAlternativeList = data.rows;
  642. }else {
  643. this.$message.warning(data.msg)
  644. }
  645. })
  646. },
  647. clickVersionTable(row){
  648. this.versionData = row;
  649. this.searchRoutingAlternative(row)
  650. }
  651. }
  652. }
  653. </script>
  654. <template>
  655. <div>
  656. <div style="margin-bottom: 5px">
  657. <el-link style="cursor:pointer;" v-if="this.selectRouting.length === 6" @click="clickVersionCheck">切换版本</el-link>
  658. <span style="display: inline-block;width: 20px"></span>
  659. <el-checkbox v-model="RoutingAllSearchFlag">全级Routing结构</el-checkbox>
  660. </div>
  661. <el-container>
  662. <el-aside width="24%" style="padding: 0;" :style="{height: height}" v-loading="treeLoading">
  663. <el-tree :data="routingTreeStructure"
  664. :props="routingProps"
  665. @node-click="nodeClick"
  666. :expand-on-click-node="false"
  667. node-key="value" style="height: 100%"
  668. default-expand-all
  669. highlight-current ref="tree"
  670. ></el-tree>
  671. </el-aside>
  672. <el-main style="padding: 0">
  673. <el-table :data="routingDetailList" :height="height"
  674. stripe border element-loading-text = "数据正在加载中"
  675. v-loading="dataListLoading">
  676. <el-table-column
  677. v-for="(item,index) in columnDetailList" :key="index"
  678. :sortable="item.columnSortable"
  679. :prop="item.columnProp"
  680. :header-align="item.headerAlign"
  681. :show-overflow-tooltip="item.showOverflowTooltip"
  682. :align="item.align"
  683. :fixed="item.fixed===''?false:item.fixed"
  684. :min-width="item.columnWidth"
  685. :label="item.columnLabel">
  686. <template slot-scope="scope">
  687. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  688. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  689. </template>
  690. </el-table-column>
  691. </el-table>
  692. </el-main>
  693. </el-container>
  694. <el-dialog :visible.sync="handoffVersion" title="工艺版本切换" v-drag append-to-body>
  695. <el-table :data="routingVersionList" :row-style="versionRowStyle" ref="routingVersionTable" style="margin-top: 8px" border :height="240" @row-click="clickVersionTable">
  696. <el-table-column label="物料编码" prop="partNo" header-align="center" align="center" show-overflow-tooltip min-width="140"/>
  697. <el-table-column label="物料描述" prop="partDesc" header-align="center" align="left" show-overflow-tooltip min-width="200"/>
  698. <el-table-column label="版本" prop="version" header-align="center" align="center" show-overflow-tooltip min-width="60"/>
  699. <el-table-column label="类型" prop="routingType" header-align="center" align="center" show-overflow-tooltip min-width="100"/>
  700. </el-table>
  701. <el-table :data="routingAlternativeList" :row-style="alternativeRowStyle" border :height="240" style="margin-top: 8px">
  702. <el-table-column label="物料编码" prop="partNo" header-align="center" align="center" show-overflow-tooltip min-width="140"/>
  703. <el-table-column label="物料描述" prop="partDesc" header-align="center" align="left" show-overflow-tooltip min-width="200"/>
  704. <el-table-column label="版本" prop="version" header-align="center" align="center" show-overflow-tooltip min-width="60"/>
  705. <el-table-column label="替代编码" prop="alternativeNo" header-align="center" align="left" show-overflow-tooltip min-width="60"/>
  706. <el-table-column label="类型" prop="routingType" header-align="center" align="center" show-overflow-tooltip min-width="100"/>
  707. <el-table-column label="操作" min-width="80" header-align="center" align="center">
  708. <template slot-scope="{row,$index}">
  709. <span style="color: #888;cursor:no-drop;" v-if="row.version === versionData.version && row.routingType === versionData.routingType && row.alternativeNo === versionData.alternativeNo">选择</span>
  710. <el-link style="cursor:pointer;" v-else @click="clickAlternative(row)">选择</el-link>
  711. </template>
  712. </el-table-column>
  713. </el-table>
  714. </el-dialog>
  715. </div>
  716. </template>
  717. <style scoped>
  718. </style>