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.

1443 lines
48 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
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year 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
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year 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
7 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
7 months ago
2 years ago
2 years ago
2 years ago
7 months ago
2 years ago
7 months ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
12 months ago
12 months ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
12 months ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year 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 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
  1. <script>
  2. import {
  3. againQuoteDetail,
  4. deleteQuoteDetail,
  5. queryQuoteDetail,
  6. saveQuoteDetail,
  7. updateQuoteDetail,
  8. updateQuoteDetailShowFlag
  9. } from "../../../../api/quote/quoteDetail";
  10. import {getProjectPartList} from "../../../../api/project/project";
  11. import QuoteDetailCost from "./primary/quoteDetailCost.vue";
  12. import QuoteDetailTool from "./primary/quoteDetailTool.vue";
  13. import QuoteDetailBom from "./primary/quoteDetailBom.vue";
  14. import QuoteDetailRouting from "./primary/quoteDetailRouting.vue";
  15. import QuoteDetailOtherCost from "./primary/quoteDetailOtherCost.vue";
  16. import DictDataSelect from "../../sys/dict-data-select.vue";
  17. import QuoteDetailTest from "./primary/quoteDetailTest.vue";
  18. import QuoteDetailOther from "./primary/quoteDetailOther.vue";
  19. export default {
  20. name: "quoteDetail",
  21. components: {
  22. QuoteDetailOther,
  23. QuoteDetailTest,
  24. DictDataSelect,
  25. QuoteDetailOtherCost,
  26. QuoteDetailRouting,
  27. QuoteDetailBom,
  28. QuoteDetailTool,
  29. QuoteDetailCost,
  30. },
  31. props:{
  32. quote:{
  33. type:Object,
  34. required:true
  35. },
  36. height:{
  37. type:[Number,String],
  38. default:300
  39. },
  40. authFlag:{
  41. type:Boolean,
  42. default:false
  43. },
  44. quoteGroupDetail:{
  45. type:Object,
  46. },
  47. saveAuth:{
  48. type:Boolean,
  49. default:true
  50. },
  51. isExport:{
  52. type:Boolean,
  53. default:false
  54. },
  55. },
  56. data(){
  57. return{
  58. quoteDetail:{
  59. id:null,
  60. partNo:'',
  61. partDesc:'',
  62. projectNo:'',
  63. projectDesc:'',
  64. buNo: '*',
  65. qty:null,
  66. quoteCount:1,
  67. partCost:0,
  68. adjustPartCost:0,
  69. labourCost:0,
  70. adjustLabourCost:0,
  71. fabricateCost:0,
  72. adjustFabricateCost:0,
  73. toolCost:0,
  74. adjustToolCost:0,
  75. machineCost:0,
  76. adjustMachineCost:0,
  77. otherCost:0,
  78. manageCost:0,
  79. totalCost:0,
  80. profitRate:0,
  81. profitAmount:0,
  82. totalPrice:0,
  83. unitPrice:0,
  84. taxRate:13,
  85. taxTotalPrice:0,
  86. taxUnitPrice:0,
  87. quoteTotalCost:0,
  88. quoteProfitRate:0,
  89. quoteProfitAmount:0,
  90. quoteTotalPrice:0,
  91. quoteUnitPrice:0,
  92. quoteTaxRate:0,
  93. quoteTaxTotalPrice:0,
  94. quoteTaxUnitPrice:0,
  95. currency1:undefined,
  96. finalTransactionPrice:null,
  97. currency2:undefined,
  98. exchangeRate1:undefined,
  99. exchangeRate2:undefined,
  100. currencyTotalCost1:0,
  101. currencyTotalCost2:0,
  102. quoteCurrencyTotalCost1:0,
  103. quoteCurrencyTotalCost2:0,
  104. // moq:'Standard 250K',
  105. moq:'',
  106. calculatedItems:'工具,测试,其他,包装,运输',
  107. testCost:0,
  108. adjustTestCost:0,
  109. elseCost:0,
  110. adjustElseCost:0,
  111. remark:'',
  112. showFlag:'N',
  113. },
  114. saveQuoteDetail:{
  115. },
  116. dataList:[],
  117. saveLoading:false,
  118. queryLoading:false,
  119. saveVisible:false,
  120. showModalFlag:false,
  121. showFlagChecked:false,
  122. saveQuoteDetailRules:{
  123. partNo: [{required: true, message: '请输入物料编码', trigger: ['blur','change']}],
  124. partDesc: [{required: true, message: '请输入物料名称', trigger: ['blur','change']}],
  125. qty: [{required: true, message: '请输入数量', trigger: ['blur','change']}],
  126. currency1: [{required: true, message: '请选择币种', trigger: ['blur','change']}],
  127. },
  128. columns: [
  129. {
  130. userId: this.$store.state.user.name,
  131. functionId: 5011,
  132. serialNumber: '5011Table2PartNo',
  133. tableId: '5011Table2',
  134. tableName: '报价详情信息表',
  135. columnProp: 'plmPartNo',
  136. headerAlign: 'center',
  137. align: 'left',
  138. columnLabel: 'PLM物料编码',
  139. columnHidden: false,
  140. columnImage: false,
  141. columnSortable: false,
  142. sortLv: 0,
  143. status: true,
  144. fixed: '',
  145. columnWidth: 120
  146. },
  147. {
  148. userId: this.$store.state.user.name,
  149. functionId: 5011,
  150. serialNumber: '5011Table2PartNo',
  151. tableId: '5011Table2',
  152. tableName: '报价详情信息表',
  153. columnProp: 'ifsPartNo',
  154. headerAlign: 'center',
  155. align: 'left',
  156. columnLabel: 'IFS物料编码',
  157. columnHidden: false,
  158. columnImage: false,
  159. columnSortable: false,
  160. sortLv: 0,
  161. status: true,
  162. fixed: '',
  163. columnWidth: 120
  164. },
  165. {
  166. userId: this.$store.state.user.name,
  167. functionId: 5011,
  168. serialNumber: '5011Table2PartDesc',
  169. tableId: '5011Table2',
  170. tableName: '报价详情信息表',
  171. columnProp: 'partDesc',
  172. headerAlign: 'center',
  173. align: 'left',
  174. columnLabel: '物料名称',
  175. columnHidden: false,
  176. columnImage: false,
  177. columnSortable: false,
  178. sortLv: 0,
  179. status: true,
  180. fixed: '',
  181. columnWidth: 240
  182. },
  183. {
  184. userId: this.$store.state.user.name,
  185. functionId: 5011,
  186. serialNumber: '5011Table2Qty',
  187. tableId: '5011Table2',
  188. tableName: '报价详情信息表',
  189. columnProp: 'qty',
  190. headerAlign: 'center',
  191. align: 'right',
  192. columnLabel: 'MOQ',
  193. columnHidden: false,
  194. columnImage: false,
  195. columnSortable: false,
  196. sortLv: 0,
  197. status: true,
  198. fixed: '',
  199. columnWidth: 100
  200. },
  201. {
  202. userId: this.$store.state.user.name,
  203. functionId: 5011,
  204. serialNumber: '5011Table2AdjustPartCost',
  205. tableId: '5011Table2',
  206. tableName: '报价详情信息表',
  207. columnProp: 'adjustPartCost',
  208. headerAlign: 'center',
  209. align: 'right',
  210. columnLabel: '材料成本',
  211. columnHidden: false,
  212. columnImage: false,
  213. columnSortable: false,
  214. sortLv: 0,
  215. status: true,
  216. fixed: '',
  217. columnWidth: 130
  218. },
  219. {
  220. userId: this.$store.state.user.name,
  221. functionId: 5011,
  222. serialNumber: '5011Table2AdjustLabourCost',
  223. tableId: '5011Table2',
  224. tableName: '报价详情信息表',
  225. columnProp: 'adjustLabourCost',
  226. headerAlign: 'center',
  227. align: 'right',
  228. columnLabel: '人工成本',
  229. columnHidden: false,
  230. columnImage: false,
  231. columnSortable: false,
  232. sortLv: 0,
  233. status: true,
  234. fixed: '',
  235. columnWidth: 120
  236. },
  237. {
  238. userId: this.$store.state.user.name,
  239. functionId: 5011,
  240. serialNumber: '5011Table2AdjustMachineCost',
  241. tableId: '5011Table2',
  242. tableName: '报价详情信息表',
  243. columnProp: 'adjustMachineCost',
  244. headerAlign: 'center',
  245. align: 'right',
  246. columnLabel: '机器成本',
  247. columnHidden: false,
  248. columnImage: false,
  249. columnSortable: false,
  250. sortLv: 0,
  251. status: true,
  252. fixed: '',
  253. columnWidth: 120
  254. },
  255. {
  256. userId: this.$store.state.user.name,
  257. functionId: 5011,
  258. serialNumber: '5011Table2AdjustToolCost',
  259. tableId: '5011Table2',
  260. tableName: '报价详情信息表',
  261. columnProp: 'adjustToolCost',
  262. headerAlign: 'center',
  263. align: 'right',
  264. columnLabel: '工具成本',
  265. columnHidden: false,
  266. columnImage: false,
  267. columnSortable: false,
  268. sortLv: 0,
  269. status: true,
  270. fixed: '',
  271. columnWidth: 120
  272. },
  273. {
  274. userId: this.$store.state.user.name,
  275. functionId: 5011,
  276. serialNumber: '5011Table2AdjustTestCost',
  277. tableId: '5011Table2',
  278. tableName: '报价详情信息表',
  279. columnProp: 'adjustTestCost',
  280. headerAlign: 'center',
  281. align: 'right',
  282. columnLabel: '测试成本',
  283. columnHidden: false,
  284. columnImage: false,
  285. columnSortable: false,
  286. sortLv: 0,
  287. status: true,
  288. fixed: '',
  289. columnWidth: 120
  290. },
  291. {
  292. userId: this.$store.state.user.name,
  293. functionId: 5011,
  294. serialNumber: '5011Table2PackCost',
  295. tableId: '5011Table2',
  296. tableName: '报价详情信息表',
  297. columnProp: 'packCost',
  298. headerAlign: 'center',
  299. align: 'right',
  300. columnLabel: '包装成本',
  301. columnHidden: false,
  302. columnImage: false,
  303. columnSortable: false,
  304. sortLv: 0,
  305. status: true,
  306. fixed: '',
  307. columnWidth: 120
  308. },
  309. {
  310. userId: this.$store.state.user.name,
  311. functionId: 5011,
  312. serialNumber: '5011Table2ShippingCost',
  313. tableId: '5011Table2',
  314. tableName: '报价详情信息表',
  315. columnProp: 'shippingCost',
  316. headerAlign: 'center',
  317. align: 'right',
  318. columnLabel: '运输成本',
  319. columnHidden: false,
  320. columnImage: false,
  321. columnSortable: false,
  322. sortLv: 0,
  323. status: true,
  324. fixed: '',
  325. columnWidth: 120
  326. },
  327. {
  328. userId: this.$store.state.user.name,
  329. functionId: 5011,
  330. serialNumber: '5011Table2AdjustElseCost',
  331. tableId: '5011Table2',
  332. tableName: '报价详情信息表',
  333. columnProp: 'adjustElseCost',
  334. headerAlign: 'center',
  335. align: 'right',
  336. columnLabel: '其他成本',
  337. columnHidden: false,
  338. columnImage: false,
  339. columnSortable: false,
  340. sortLv: 0,
  341. status: true,
  342. fixed: '',
  343. columnWidth: 120
  344. },
  345. {
  346. userId: this.$store.state.user.name,
  347. functionId: 5011,
  348. serialNumber: '5011Table2TotalCost',
  349. tableId: '5011Table2',
  350. tableName: '报价详情信息表',
  351. columnProp: 'totalCost',
  352. headerAlign: 'center',
  353. align: 'right',
  354. columnLabel: '总成本',
  355. columnHidden: false,
  356. columnImage: false,
  357. columnSortable: false,
  358. sortLv: 0,
  359. status: true,
  360. fixed: '',
  361. columnWidth: 80
  362. },
  363. {
  364. userId: this.$store.state.user.name,
  365. functionId: 5011,
  366. serialNumber: '5011Table2FinalTransactionPrice',
  367. tableId: '5011Table2',
  368. tableName: '报价详情信息表',
  369. columnProp: 'finalTransactionPrice',
  370. headerAlign: 'center',
  371. align: 'right',
  372. columnLabel: '最终交易价',
  373. columnHidden: false,
  374. columnImage: false,
  375. columnSortable: false,
  376. sortLv: 0,
  377. status: true,
  378. fixed: '',
  379. columnWidth: 80
  380. },
  381. {
  382. userId: this.$store.state.user.name,
  383. functionId: 5011,
  384. serialNumber: '5011Table2QuoteProfitRate',
  385. tableId: '5011Table2',
  386. tableName: '报价详情信息表',
  387. columnProp: 'quoteProfitRate',
  388. headerAlign: 'center',
  389. align: 'right',
  390. columnLabel: 'VA%',
  391. columnHidden: false,
  392. columnImage: false,
  393. columnSortable: false,
  394. sortLv: 0,
  395. status: true,
  396. fixed: '',
  397. columnWidth: 80
  398. },
  399. {
  400. userId: this.$store.state.user.name,
  401. functionId: 5011,
  402. serialNumber: '5011Table2QuoteProfitAmount',
  403. tableId: '5011Table2',
  404. tableName: '报价详情信息表',
  405. columnProp: 'quoteProfitAmount',
  406. headerAlign: 'center',
  407. align: 'right',
  408. columnLabel: 'Contribution%',
  409. columnHidden: false,
  410. columnImage: false,
  411. columnSortable: false,
  412. sortLv: 0,
  413. status: true,
  414. fixed: '',
  415. columnWidth: 100
  416. },
  417. {
  418. userId: this.$store.state.user.name,
  419. functionId: 5011,
  420. serialNumber: '5011Table2QuoteTaxRate',
  421. tableId: '5011Table2',
  422. tableName: '报价详情信息表',
  423. columnProp: 'quoteTaxRate',
  424. headerAlign: 'center',
  425. align: 'right',
  426. columnLabel: 'Margin%',
  427. columnHidden: false,
  428. columnImage: false,
  429. columnSortable: false,
  430. sortLv: 0,
  431. status: true,
  432. fixed: '',
  433. columnWidth: 80
  434. },
  435. {
  436. userId: this.$store.state.user.name,
  437. functionId: 5011,
  438. serialNumber: '5011Table2QuoteTaxTotalPrice',
  439. tableId: '5011Table2',
  440. tableName: '报价详情信息表',
  441. columnProp: 'quoteTaxTotalPrice',
  442. headerAlign: 'center',
  443. align: 'right',
  444. columnLabel: 'Price ¥(ex VAT)',
  445. columnHidden: false,
  446. columnImage: false,
  447. columnSortable: false,
  448. sortLv: 0,
  449. status: true,
  450. fixed: '',
  451. columnWidth: 100
  452. },
  453. {
  454. userId: this.$store.state.user.name,
  455. functionId: 5011,
  456. serialNumber: '5011Table2Qty',
  457. tableId: '5011Table2',
  458. tableName: '报价详情信息表',
  459. columnProp: 'unitPrice',
  460. headerAlign: 'center',
  461. align: 'right',
  462. columnLabel: '未税单价',
  463. columnHidden: false,
  464. columnImage: false,
  465. columnSortable: false,
  466. sortLv: 0,
  467. status: true,
  468. fixed: '',
  469. columnWidth: 100
  470. },
  471. {
  472. userId: this.$store.state.user.name,
  473. functionId: 5011,
  474. serialNumber: '5011Table2Qty',
  475. tableId: '5011Table2',
  476. tableName: '报价详情信息表',
  477. columnProp: 'taxRate',
  478. headerAlign: 'center',
  479. align: 'right',
  480. columnLabel: '税率',
  481. columnHidden: false,
  482. columnImage: false,
  483. columnSortable: false,
  484. sortLv: 0,
  485. status: true,
  486. fixed: '',
  487. columnWidth: 100
  488. },
  489. {
  490. userId: this.$store.state.user.name,
  491. functionId: 5011,
  492. serialNumber: '5011Table2Qty',
  493. tableId: '5011Table2',
  494. tableName: '报价详情信息表',
  495. columnProp: 'exchangeRate1',
  496. headerAlign: 'center',
  497. align: 'right',
  498. columnLabel: '其他税率',
  499. columnHidden: false,
  500. columnImage: false,
  501. columnSortable: false,
  502. sortLv: 0,
  503. status: true,
  504. fixed: '',
  505. columnWidth: 100
  506. },
  507. {
  508. userId: this.$store.state.user.name,
  509. functionId: 5011,
  510. serialNumber: '5011Table2Qty',
  511. tableId: '5011Table2',
  512. tableName: '报价详情信息表',
  513. columnProp: 'taxUnitPrice',
  514. headerAlign: 'center',
  515. align: 'right',
  516. columnLabel: '含税单价(CNY)',
  517. columnHidden: false,
  518. columnImage: false,
  519. columnSortable: false,
  520. sortLv: 0,
  521. status: true,
  522. fixed: '',
  523. columnWidth: 100
  524. },
  525. {
  526. userId: this.$store.state.user.name,
  527. functionId: 5011,
  528. serialNumber: '5011Table2Qty',
  529. tableId: '5011Table2',
  530. tableName: '报价详情信息表',
  531. columnProp: 'currencyDesc2',
  532. headerAlign: 'center',
  533. align: 'right',
  534. columnLabel: '币种',
  535. columnHidden: false,
  536. columnImage: false,
  537. columnSortable: false,
  538. sortLv: 0,
  539. status: true,
  540. fixed: '',
  541. columnWidth: 100
  542. },
  543. {
  544. userId: this.$store.state.user.name,
  545. functionId: 5011,
  546. serialNumber: '5011Table2Qty',
  547. tableId: '5011Table2',
  548. tableName: '报价详情信息表',
  549. columnProp: 'exchangeRate2',
  550. headerAlign: 'center',
  551. align: 'right',
  552. columnLabel: '汇率',
  553. columnHidden: false,
  554. columnImage: false,
  555. columnSortable: false,
  556. sortLv: 0,
  557. status: true,
  558. fixed: '',
  559. columnWidth: 100
  560. },
  561. {
  562. userId: this.$store.state.user.name,
  563. functionId: 5011,
  564. serialNumber: '5011Table2Qty',
  565. tableId: '5011Table2',
  566. tableName: '报价详情信息表',
  567. columnProp: 'currencyTotalCost2',
  568. headerAlign: 'center',
  569. align: 'right',
  570. columnLabel: '含税单价',
  571. columnHidden: false,
  572. columnImage: false,
  573. columnSortable: false,
  574. sortLv: 0,
  575. status: true,
  576. fixed: '',
  577. columnWidth: 100
  578. },
  579. {
  580. userId: this.$store.state.user.name,
  581. functionId: 5011,
  582. serialNumber: '5011Table2Qty',
  583. tableId: '5011Table2',
  584. tableName: '报价详情信息表',
  585. columnProp: 'unitPrice',
  586. headerAlign: 'center',
  587. align: 'right',
  588. columnLabel: '未税单价(CNY)',
  589. columnHidden: false,
  590. columnImage: false,
  591. columnSortable: false,
  592. sortLv: 0,
  593. status: true,
  594. fixed: '',
  595. columnWidth: 100
  596. },
  597. {
  598. userId: this.$store.state.user.name,
  599. functionId: 5011,
  600. serialNumber: '5011Table2Qty',
  601. tableId: '5011Table2',
  602. tableName: '报价详情信息表',
  603. columnProp: 'unitPriceRate',
  604. headerAlign: 'center',
  605. align: 'right',
  606. columnLabel: '未税单价',
  607. columnHidden: false,
  608. columnImage: false,
  609. columnSortable: false,
  610. sortLv: 0,
  611. status: true,
  612. fixed: '',
  613. columnWidth: 100
  614. },
  615. {
  616. userId: this.$store.state.user.name,
  617. functionId: 5011,
  618. serialNumber: '5011Table2Remark',
  619. tableId: '5011Table2',
  620. tableName: '报价详情信息表',
  621. columnProp: 'remark',
  622. headerAlign: 'center',
  623. align: 'left',
  624. columnLabel: '备注',
  625. columnHidden: false,
  626. columnImage: false,
  627. columnSortable: false,
  628. sortLv: 0,
  629. status: true,
  630. fixed: '',
  631. columnWidth: 120
  632. },
  633. ],
  634. partVisible:false,
  635. activeName:'bom',
  636. projectPart:{
  637. },
  638. projectPartList:[],
  639. pageNo:1,
  640. pageSize:20,
  641. pageTotal:0,
  642. partQueryLoading:false,
  643. projectPartColumns:[
  644. {
  645. userId: this.$store.state.user.name,
  646. functionId: 5011,
  647. serialNumber: '5011Table3TestPartNo',
  648. tableId: '5011Table3',
  649. tableName: '项目物料表',
  650. columnProp: 'testPartNo',
  651. headerAlign: 'center',
  652. align: 'left',
  653. columnLabel: '物料编码',
  654. columnHidden: false,
  655. columnImage: false,
  656. columnSortable: false,
  657. sortLv: 0,
  658. status: true,
  659. fixed: '',
  660. columnWidth: 150
  661. },
  662. {
  663. userId: this.$store.state.user.name,
  664. functionId: 5011,
  665. serialNumber: '5011Table3PartDesc',
  666. tableId: '5011Table3',
  667. tableName: '项目物料表',
  668. columnProp: 'partDesc',
  669. headerAlign: 'center',
  670. align: 'left',
  671. columnLabel: '物料名称',
  672. columnHidden: false,
  673. columnImage: false,
  674. columnSortable: false,
  675. sortLv: 0,
  676. status: true,
  677. fixed: '',
  678. columnWidth: 160
  679. },
  680. {
  681. userId: this.$store.state.user.name,
  682. functionId: 5011,
  683. serialNumber: '5011Table3FinalPartNo',
  684. tableId: '5011Table3',
  685. tableName: '项目物料表',
  686. columnProp: 'finalPartNo',
  687. headerAlign: 'center',
  688. align: 'left',
  689. columnLabel: 'IFS物料编码',
  690. columnHidden: false,
  691. columnImage: false,
  692. columnSortable: false,
  693. sortLv: 0,
  694. status: true,
  695. fixed: '',
  696. columnWidth: 150
  697. },
  698. {
  699. userId: this.$store.state.user.name,
  700. functionId: 5011,
  701. serialNumber: '5011Table3CustomerPartNo',
  702. tableId: '5011Table3',
  703. tableName: '项目物料表',
  704. columnProp: 'customerPartNo',
  705. headerAlign: 'center',
  706. align: 'left',
  707. columnLabel: '客户物料编码',
  708. columnHidden: false,
  709. columnImage: false,
  710. columnSortable: false,
  711. sortLv: 0,
  712. status: true,
  713. fixed: '',
  714. columnWidth: 150
  715. },
  716. {
  717. userId: this.$store.state.user.name,
  718. functionId: 5011,
  719. serialNumber: '5011Table3Type',
  720. tableId: '5011Table3',
  721. tableName: '项目物料表',
  722. columnProp: 'type',
  723. headerAlign: 'center',
  724. align: 'left',
  725. columnLabel: '制造类型',
  726. columnHidden: false,
  727. columnImage: false,
  728. columnSortable: false,
  729. sortLv: 0,
  730. status: true,
  731. fixed: '',
  732. columnWidth: 120
  733. },
  734. {
  735. userId: this.$store.state.user.name,
  736. functionId: 5011,
  737. serialNumber: '5011Table3UmId',
  738. tableId: '5011Table3',
  739. tableName: '项目物料表',
  740. columnProp: 'umId',
  741. headerAlign: 'center',
  742. align: 'left',
  743. columnLabel: '单位',
  744. columnHidden: false,
  745. columnImage: false,
  746. columnSortable: false,
  747. sortLv: 0,
  748. status: true,
  749. fixed: '',
  750. columnWidth: 100
  751. },
  752. ],
  753. exportData:[],
  754. exportName: '报价条目明细'+this.dayjs().format('YYYYMMDDHHmmss'),
  755. exportHeader: ["报价条目明细"],
  756. exportFooter: [],
  757. againVisible:false,
  758. againRow:{},
  759. }
  760. },
  761. methods:{
  762. handleSaveQuoteDetail(row){
  763. this.$nextTick(()=>{
  764. if (this.$refs.handleSaveQuoteDetailClick){
  765. this.$refs.saveQuoteDetailForm.clearValidate();
  766. }
  767. })
  768. if (row){
  769. this.saveQuoteDetail = {
  770. ...row
  771. }
  772. // 设置勾选状态
  773. this.showFlagChecked = row.showFlag === 'Y'
  774. }else {
  775. this.saveQuoteDetail = {
  776. ...this.quoteDetail,
  777. createBy:this.$store.state.user.name,
  778. status:'草稿',
  779. active:'Y',
  780. qty:1,
  781. isDetail:false,
  782. }
  783. if (this.quoteGroupDetail){
  784. this.saveQuoteDetail.partNo = this.quoteGroupDetail.partNo
  785. this.saveQuoteDetail.partDesc = this.quoteGroupDetail.partDesc
  786. }
  787. this.$nextTick(()=>{
  788. this.saveQuoteDetail.projectNo = this.quote.projectNo
  789. })
  790. // 新建时默认不勾选
  791. this.showFlagChecked = false
  792. }
  793. this.saveQuoteDetail.showModalFlag = false
  794. this.activeName = 'bom';
  795. this.saveVisible = true;
  796. this.showModalFlag = false;
  797. },
  798. handleDetail(row){
  799. this.saveQuoteDetail = {
  800. ...row
  801. }
  802. this.saveQuoteDetail.showModalFlag = true
  803. // 设置勾选状态
  804. this.showFlagChecked = row.showFlag === 'Y'
  805. this.activeName = 'bom';
  806. this.saveVisible = true;
  807. this.showModalFlag = true;
  808. },
  809. handleShowFlagChange(val){
  810. // 勾选变化时直接更新数据库,只修改show_flag字段
  811. if (!this.saveQuoteDetail.id) {
  812. return
  813. }
  814. const newShowFlag = val ? 'Y' : 'N'
  815. const params = {
  816. id: this.saveQuoteDetail.id,
  817. showFlag: newShowFlag
  818. }
  819. updateQuoteDetailShowFlag(params).then(({data}) => {
  820. if (data && data.code === 0) {
  821. this.saveQuoteDetail.showFlag = newShowFlag
  822. this.$message.success('更新成功')
  823. // 刷新列表
  824. this.handleQueryQuoteDetail()
  825. } else {
  826. this.$message.warning(data.msg)
  827. // 恢复勾选状态
  828. this.showFlagChecked = !val
  829. }
  830. }).catch((error) => {
  831. this.$message.error(error)
  832. // 恢复勾选状态
  833. this.showFlagChecked = !val
  834. })
  835. },
  836. handleDeleteQuoteDetail(row){
  837. this.$confirm('确认删除该条报价明细吗?', '提示', {
  838. confirmButtonText: '确定',
  839. cancelButtonText: '取消',
  840. type: 'warning'
  841. }).then(() => {
  842. let params = {
  843. id: row.id,
  844. }
  845. deleteQuoteDetail(params).then(({data}) => {
  846. if (data && data.code === 0) {
  847. this.$message.success(data.msg);
  848. this.handleQueryQuoteDetail();
  849. // 通知父组件刷新主信息
  850. console.log('emit refresh-quote-info event (delete), quoteId:', this.quote.id)
  851. this.$emit('refresh-quote-info', this.quote.id)
  852. } else {
  853. this.$message.warning(data.msg);
  854. }
  855. }).catch((error) => {
  856. this.$message.error(error);
  857. })
  858. }).catch(() => {
  859. })
  860. },
  861. handlePartNoBlur(){
  862. let params = {
  863. site:this.$store.state.user.site,
  864. testPartNo:this.saveQuoteDetail.partNo,
  865. projectId: this.quote.projectNo,
  866. no:1,
  867. size:20,
  868. }
  869. getProjectPartList(params).then(({data})=>{
  870. if (data && data.code === 0){
  871. if (data.rows && data.rows.length === 1){
  872. this.dblClickProjectPartTable(data.rows[0])
  873. }else {
  874. this.saveQuoteDetail.partDesc = ''
  875. }
  876. }
  877. })
  878. },
  879. handleQueryQuoteDetail(){
  880. let params = {
  881. quoteId: this.quote.id,
  882. }
  883. if (this.quoteGroupDetail){
  884. params.quoteGroupDetailId=this.quoteGroupDetail.id;
  885. }
  886. this.queryLoading = true;
  887. queryQuoteDetail(params).then(({data})=>{
  888. if (data && data.code === 0){
  889. this.dataList = data.rows
  890. }else {
  891. this.$message.warning(data.msg);
  892. }
  893. this.queryLoading = false;
  894. }).catch((error)=>{
  895. this.$message.error(error);
  896. this.queryLoading = false;
  897. })
  898. },
  899. handleSaveQuoteDetailClick(){
  900. this.$refs.saveQuoteDetailForm.validate((valid,obj) => {
  901. if (valid){
  902. if (this.saveQuoteDetail.id){
  903. this.handleUpdate();
  904. }else {
  905. this.handleSave();
  906. }
  907. }else {
  908. let i = 1;
  909. for (let key in obj) {
  910. this.$message.error(obj[key][0].message);
  911. if (i === 1){
  912. return
  913. }
  914. i++;
  915. }
  916. }
  917. })
  918. },
  919. handleSave(){
  920. console.log('handleSave 被调用, quote.id:', this.quote.id)
  921. let params = {
  922. ...this.saveQuoteDetail,
  923. quoteId: this.quote.id,
  924. quoteNo:this.quote.quoteNo,
  925. site:this.quote.site,
  926. buNo:this.quote.buNo,
  927. versionNo:this.quote.versionNo,
  928. createBy:this.saveQuoteDetail.createBy,
  929. active:'Y',
  930. status:'草稿',
  931. internalInquiryNo:this.quote.insideInquiryNo,
  932. }
  933. if (this.quoteGroupDetail){
  934. params.quoteGroupDetailId=this.quoteGroupDetail.id;
  935. }
  936. this.saveLoading = true;
  937. saveQuoteDetail(params).then(({data})=>{
  938. if (data && data.code === 0){
  939. this.$message.success(data.msg);
  940. this.handleQueryQuoteDetail();
  941. if (this.saveQuoteDetail.isDetail){
  942. this.saveQuoteDetail = {
  943. ...data.row,
  944. }
  945. }else {
  946. this.saveVisible = false;
  947. }
  948. // 通知父组件刷新主信息
  949. console.log('emit refresh-quote-info event (save), quoteId:', this.quote.id)
  950. this.$emit('refresh-quote-info', this.quote.id)
  951. }else {
  952. this.$message.warning(data.msg);
  953. }
  954. this.saveLoading = false
  955. }).catch((error)=>{
  956. this.$message.error(error);
  957. this.saveLoading = false
  958. })
  959. },
  960. handleUpdate(){
  961. let params = {
  962. ...this.saveQuoteDetail,
  963. updateBy:this.$store.state.user.name,
  964. }
  965. updateQuoteDetail(params).then(({data})=>{
  966. if (data && data.code === 0){
  967. this.$message.success(data.msg);
  968. this.handleQueryQuoteDetail();
  969. this.saveVisible = false;
  970. // 通知父组件刷新主信息
  971. console.log('emit refresh-quote-info event (update), quoteId:', this.quote.id)
  972. this.$emit('refresh-quote-info', this.quote.id)
  973. }else {
  974. this.$message.warning(data.msg);
  975. }
  976. }).catch((error)=>{
  977. this.$message.error(error);
  978. })
  979. },
  980. handleClickTab(tab){
  981. if (this.activeName === 'routing'){
  982. this.$refs.routing.handleQueryQuoteDetailBomTree()
  983. }else if (this.activeName === 'tool'){
  984. this.$refs.tool.handleQueryQuoteDetailTool();
  985. }
  986. },
  987. handleAgainQuoteDetail(row){
  988. this.againRow = row;
  989. this.againVisible = true;
  990. },
  991. againQuoteDetail(){
  992. this.$refs.againForm.validate((valid,obj) => {
  993. if (valid){
  994. this.queryLoading = true;
  995. this.saveLoading = true;
  996. againQuoteDetail(this.againRow).then(({data})=>{
  997. if (data && data.code === 0){
  998. this.againVisible = false
  999. this.handleQueryQuoteDetail();
  1000. this.$message.success(data.msg);
  1001. }else {
  1002. this.$message.warning(data.msg);
  1003. }
  1004. this.queryLoading = false;
  1005. this.saveLoading = false;
  1006. }).catch((error)=>{
  1007. this.$message.error(error);
  1008. this.queryLoading = false;
  1009. this.saveLoading = false;
  1010. })
  1011. }else {
  1012. let i = 1;
  1013. for (let key in obj) {
  1014. this.$message.error(obj[key][0].message);
  1015. if (i === 1){
  1016. return
  1017. }
  1018. i++;
  1019. }
  1020. }
  1021. })
  1022. },
  1023. handleQueryPartList(){
  1024. this.projectPart = {
  1025. testPartNo:this.saveQuoteDetail.partNo,
  1026. partDesc:'',
  1027. finalPartNo:'',
  1028. customerPartNo:'',
  1029. site:this.$store.state.user.site,
  1030. }
  1031. this.partVisible = true;
  1032. this.getProjectPartList();
  1033. },
  1034. getProjectPartList(){
  1035. let params = {
  1036. ...this.projectPart,
  1037. no:this.pageNo,
  1038. size:this.pageSize,
  1039. }
  1040. params.projectId = this.quote.projectNo
  1041. this.partQueryLoading = true;
  1042. getProjectPartList(params).then(({data})=>{
  1043. if (data && data.code === 0){
  1044. this.projectPartList = data.rows;
  1045. this.pageTotal = data.total;
  1046. }
  1047. this.partQueryLoading = false;
  1048. }).catch((error)=>{
  1049. this.partQueryLoading = false;
  1050. })
  1051. },
  1052. handleSizeChange(val){
  1053. this.pageSize = val;
  1054. this.getProjectPartList();
  1055. },
  1056. handleCurrentChange(val){
  1057. this.pageNo = val;
  1058. this.getProjectPartList();
  1059. },
  1060. dblClickProjectPartTable(row){
  1061. this.saveQuoteDetail.partNo = row.testPartNo;
  1062. this.saveQuoteDetail.partDesc = row.partDesc;
  1063. this.partVisible = false;
  1064. },
  1065. handleClose(){
  1066. this.$emit('close');
  1067. this.saveVisible = false;
  1068. },
  1069. fields() {
  1070. let json = "{"
  1071. this.columns.forEach((item, index) => {
  1072. if (index === this.columns.length - 1) {
  1073. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1074. } else {
  1075. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1076. }
  1077. })
  1078. json += "}"
  1079. return eval("(" + json + ")")
  1080. },
  1081. createExportData() {
  1082. return this.dataList;
  1083. },
  1084. toPartMenu (partNo) {
  1085. if (this.$router.resolve(`/part-partInformation`).resolved.name === '404') {
  1086. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  1087. } else {
  1088. this.$router.push({name:`part-partInformation`,params:{partNo:partNo},})
  1089. }
  1090. },
  1091. formatDecimal(value) {
  1092. const num = parseFloat(value);
  1093. return !isNaN(num) ? num.toFixed(4) : value;
  1094. },
  1095. handleSetDefaultQuoteRow(row) {
  1096. if (!this.isAuth('5011:group:current')) {
  1097. return;
  1098. }
  1099. const oldVal = this.quoteGroupDetail.currentQuoteDetailItemNo;
  1100. this.quoteGroupDetail.currentQuoteDetailItemNo = row.itemNo;
  1101. // 直接触发emit事件
  1102. this.$emit('currentQuoteDetailItemNo', oldVal);
  1103. }
  1104. },
  1105. watch:{
  1106. quote(newVal,oldVal){
  1107. if (newVal.id){
  1108. this.quoteDetail.profitRate = this.quote.markup
  1109. this.quoteDetail.quoteProfitRate = this.quote.markup
  1110. this.handleQueryQuoteDetail();
  1111. }else {
  1112. this.dataList = [];
  1113. }
  1114. },
  1115. "saveQuoteDetail.partNo"(newVal,oldVal){
  1116. if (newVal){
  1117. this.saveQuoteDetail.partNo = newVal.toUpperCase();
  1118. }
  1119. },
  1120. partVisible(newVal,oldVal){
  1121. if (newVal === false){
  1122. this.partQueryLoading = false
  1123. this.pageNo = 1;
  1124. this.projectPartList = [];
  1125. }
  1126. },
  1127. quoteGroupDetail(newVal,oldVal){
  1128. if (newVal){
  1129. this.quoteDetail.profitRate = this.quote.markup
  1130. this.quoteDetail.quoteProfitRate = this.quote.markup
  1131. this.handleQueryQuoteDetail();
  1132. }
  1133. },
  1134. // 'quoteGroupDetail.currentQuoteDetailItemNo'(newVal,oldVal){
  1135. // // console.log(this.quoteGroupDetail)
  1136. // // emit事件触发修改
  1137. // if (this.quoteGroupDetail && this.quoteGroupDetail.currentQuoteDetailItemNo){
  1138. // this.$emit('currentQuoteDetailItemNo',oldVal);
  1139. // }
  1140. // }
  1141. },
  1142. created() {
  1143. this.quoteDetail.profitRate = this.quote.markup
  1144. this.quoteDetail.quoteProfitRate = this.quote.markup
  1145. this.handleQueryQuoteDetail();
  1146. }
  1147. }
  1148. </script>
  1149. <template>
  1150. <div>
  1151. <template v-if="saveAuth">
  1152. <el-button type="primary" v-if="!authFlag" :disabled="quote.status === '下达' || !quote.status" @click="handleSaveQuoteDetail(null)">新增</el-button>
  1153. </template>
  1154. <template v-if="isExport">
  1155. <download-excel
  1156. :fields="fields()"
  1157. :data="exportData"
  1158. type="xls"
  1159. :name="exportName"
  1160. :header="exportHeader"
  1161. :footer="exportFooter"
  1162. :fetch="createExportData"
  1163. worksheet="导出信息"
  1164. class="el-button el-button--primary el-button--medium">
  1165. {{ '导出' }}
  1166. </download-excel>
  1167. </template>
  1168. <el-table v-loading="queryLoading" border :data="dataList" style="width: 100%;margin-top: 5px" :height="height">
  1169. <el-table-column width="80" align="center" label="默认报价行" v-if="quoteGroupDetail && quoteGroupDetail.status === '草稿'">
  1170. <template slot-scope="{row}">
  1171. <div style="cursor: pointer;">
  1172. <el-radio
  1173. class="radio"
  1174. :label="row.itemNo"
  1175. :disabled="!isAuth('5011:group:current')"
  1176. v-model="quoteGroupDetail.currentQuoteDetailItemNo"
  1177. @click.native.prevent="handleSetDefaultQuoteRow(row)"
  1178. ></el-radio>
  1179. </div>
  1180. </template>
  1181. </el-table-column>
  1182. <el-table-column type="index" width="55" align="center" label="序号"></el-table-column>
  1183. <el-table-column
  1184. v-for="(item,index) in columns" :key="index"
  1185. :sortable="item.columnSortable"
  1186. :prop="item.columnProp"
  1187. :header-align="item.headerAlign"
  1188. :show-overflow-tooltip="item.showOverflowTooltip"
  1189. :align="item.align"
  1190. :fixed="item.fixed === ''?false:item.fixed"
  1191. :min-width="item.columnWidth"
  1192. :label="item.columnLabel">
  1193. <template slot-scope="scope">
  1194. <template v-if="item.columnProp === 'unitPriceRate'">
  1195. {{ formatDecimal(scope.row.unitPriceRate) }}
  1196. </template>
  1197. <template v-else-if="!quoteGroupDetail && item.columnProp === 'plmPartNo'">
  1198. <el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="toPartMenu(scope.row.plmPartNo)"> {{ scope.row[item.columnProp] }}</el-link>
  1199. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1200. </template>
  1201. <template v-else>
  1202. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  1203. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  1204. style="width: 100px; height: 80px"/></span>
  1205. </template>
  1206. </template>
  1207. </el-table-column>
  1208. <el-table-column label="操作" v-if="!authFlag" fixed="right" align="center" width="160">
  1209. <template slot-scope="{row,$index}">
  1210. <template v-if="isAuth('5011:detail:update')">
  1211. <a type="text" v-if="row.status === '草稿' || row.status === '审批中'" @click="handleSaveQuoteDetail(row)">编辑</a>
  1212. </template>
  1213. <template v-if="isAuth('5011:detail:remove')">
  1214. <a type="text" v-if="row.status === '草稿' && !(quoteGroupDetail && quoteGroupDetail.currentQuoteDetailItemNo === row.itemNo)" @click="handleDeleteQuoteDetail(row)">删除</a>
  1215. </template>
  1216. <template v-if="isAuth('5011:detail:again')">
  1217. <!-- <a type="text" v-if="row.status !== '下达'" @click="againQuoteDetail(row)">复制明细</a>-->
  1218. <a type="text" v-if="row.status !== '下达'" @click="handleAgainQuoteDetail(row)">复制明细</a>
  1219. </template>
  1220. <template v-if="isAuth('5011:detail:detail')">
  1221. <a type="text" @click="handleDetail(row)">详情</a>
  1222. </template>
  1223. </template>
  1224. </el-table-column>
  1225. </el-table>
  1226. <el-dialog :title="`报价明细`" top="10vh" v-drag :visible.sync="saveVisible" append-to-body :width="`${saveQuoteDetail.id?1200:600}px`" :close-on-click-modal="false">
  1227. <el-form :model="saveQuoteDetail" ref="saveQuoteDetailForm" :rules="saveQuoteDetailRules" label-position="top" v-if="!saveQuoteDetail.id">
  1228. <el-row :gutter="20">
  1229. <el-col :span="8">
  1230. <el-form-item label="物料编码" prop="partNo" :show-message="false">
  1231. <span slot="label" v-if="!quoteGroupDetail">
  1232. <a @click="handleQueryPartList">物料编码</a>
  1233. </span>
  1234. <el-input v-model="saveQuoteDetail.partNo" :disabled="quoteGroupDetail" @change="handlePartNoBlur"></el-input>
  1235. </el-form-item>
  1236. </el-col>
  1237. <el-col :span="16">
  1238. <el-form-item label="物料名称" prop="partDesc" :show-message="false">
  1239. <el-input v-model="saveQuoteDetail.partDesc" disabled></el-input>
  1240. </el-form-item>
  1241. </el-col>
  1242. <el-col :span="8">
  1243. <el-form-item label="MOQ" prop="qty" :show-message="false">
  1244. <el-input-number style="width: 100%;" v-model="saveQuoteDetail.qty" :min="1" :step="0" :precision="0" :controls="false"></el-input-number>
  1245. </el-form-item>
  1246. </el-col>
  1247. <el-col :span="8">
  1248. <el-form-item label="币种" prop="currency1" :show-message="false">
  1249. <dict-data-select style="width: 100%" dict-type="plm_customer_information_customer_customer_currency" v-model="saveQuoteDetail.currency1"></dict-data-select>
  1250. </el-form-item>
  1251. </el-col>
  1252. </el-row>
  1253. <el-row :gutter="20">
  1254. <el-col :span="8">
  1255. <el-form-item label="" :show-message="false">
  1256. <el-checkbox v-model="saveQuoteDetail.isDetail">保存进入报价页面</el-checkbox>
  1257. </el-form-item>
  1258. </el-col>
  1259. <el-col :span="24">
  1260. <el-form-item label="备注" class="auto" :show-message="false">
  1261. <el-input type="textarea" v-model="saveQuoteDetail.remark" :autosize="{minRows: 3, maxRows: 3}"></el-input>
  1262. </el-form-item>
  1263. </el-col>
  1264. </el-row>
  1265. </el-form>
  1266. <el-form v-else :model="saveQuoteDetail" ref="saveQuoteDetailForm" :rules="saveQuoteDetailRules" label-position="top">
  1267. <el-row :gutter="20">
  1268. <el-col :span="4">
  1269. <el-form-item label="物料编码" prop="partNo" :show-message="false">
  1270. <el-input v-model="saveQuoteDetail.partNo" disabled></el-input>
  1271. </el-form-item>
  1272. </el-col>
  1273. <el-col :span="6">
  1274. <el-form-item label="物料名称" prop="partDesc" :show-message="false">
  1275. <el-input v-model="saveQuoteDetail.partDesc" disabled></el-input>
  1276. </el-form-item>
  1277. </el-col>
  1278. <el-col :span="3">
  1279. <el-form-item label="MOQ" prop="qty" :show-message="false">
  1280. <el-input-number v-model="saveQuoteDetail.qty" style="width: 100%;" :controls="false" :disabled="showModalFlag||saveQuoteDetail.status === '下达'"></el-input-number>
  1281. </el-form-item>
  1282. </el-col>
  1283. <el-col :span="3">
  1284. <el-form-item label="币种" prop="currency1" :show-message="false">
  1285. <dict-data-select :disabled="showModalFlag||saveQuoteDetail.status === '下达'" style="width: 100%" dict-type="plm_customer_information_customer_customer_currency" v-model="saveQuoteDetail.currency1"></dict-data-select>
  1286. </el-form-item>
  1287. </el-col>
  1288. <el-col :span="3">
  1289. <el-form-item label="最终交易价" :show-message="false">
  1290. <el-input-number v-model="saveQuoteDetail.finalTransactionPrice" :controls="false" :disabled="showModalFlag||saveQuoteDetail.status === '下达'" style="width: 100%"></el-input-number>
  1291. </el-form-item>
  1292. </el-col>
  1293. <el-col :span="5">
  1294. <el-form-item label=" " :show-message="false">
  1295. <el-checkbox v-model="showFlagChecked" :disabled="showModalFlag" @change="handleShowFlagChange">询价申请中展示该条目行</el-checkbox>
  1296. </el-form-item>
  1297. </el-col>
  1298. </el-row>
  1299. <el-row :gutter="20">
  1300. <el-col :span="23">
  1301. <el-form-item label="备注" class="auto" :show-message="false">
  1302. <el-input type="textarea" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="saveQuoteDetail.remark" :disabled="showModalFlag||saveQuoteDetail.status === '下达'"></el-input>
  1303. </el-form-item>
  1304. </el-col>
  1305. </el-row>
  1306. </el-form>
  1307. <el-tabs v-model="activeName" v-if="saveQuoteDetail.id" @tab-click="handleClickTab">
  1308. <el-tab-pane label="材料" name="bom">
  1309. <quote-detail-bom v-if="saveVisible && activeName === 'bom'" @close="handleClose" v-model:quoteDetail="saveQuoteDetail"></quote-detail-bom>
  1310. </el-tab-pane>
  1311. <el-tab-pane label="工艺" name="routing">
  1312. <quote-detail-routing ref="routing" v-if="saveVisible && activeName === 'routing'" @close="handleClose" v-model:quoteDetail="saveQuoteDetail"></quote-detail-routing>
  1313. </el-tab-pane>
  1314. <el-tab-pane label="工具" name="tool">
  1315. <quote-detail-tool ref="tool" v-if="saveVisible && activeName === 'tool'" v-model:quoteDetail="saveQuoteDetail"></quote-detail-tool>
  1316. </el-tab-pane>
  1317. <el-tab-pane label="测试" name="test">
  1318. <quote-detail-test v-if="saveVisible && activeName === 'test'" v-model:quoteDetail="saveQuoteDetail"></quote-detail-test>
  1319. </el-tab-pane>
  1320. <el-tab-pane label="包装&运输" name="otherCost">
  1321. <quote-detail-other-cost v-if="saveVisible && activeName === 'otherCost'" v-model:quoteDetail="saveQuoteDetail"></quote-detail-other-cost>
  1322. </el-tab-pane>
  1323. <el-tab-pane label="其他" name="other">
  1324. <quote-detail-other v-if="saveVisible && activeName === 'other'" v-model:quoteDetail="saveQuoteDetail"></quote-detail-other>
  1325. </el-tab-pane>
  1326. <el-tab-pane label="成本&价格" name="cost">
  1327. <quote-detail-cost v-if="saveVisible && activeName === 'cost'" ref="cost" v-model:quoteDetail="saveQuoteDetail"></quote-detail-cost>
  1328. </el-tab-pane>
  1329. </el-tabs>
  1330. <div slot="footer" class="dialog-footer">
  1331. <el-button type="primary" v-if="!this.showModalFlag&&(saveQuoteDetail.status === '草稿' || saveQuoteDetail.status === '审批中')" :loading="saveLoading" @click="handleSaveQuoteDetailClick"> </el-button>
  1332. <el-button @click="saveVisible = false"> </el-button>
  1333. </div>
  1334. </el-dialog>
  1335. <el-dialog v-drag title="物料信息" append-to-body :close-on-click-modal="false" :visible.sync="partVisible">
  1336. <!--搜索条件-->
  1337. <el-form :model="projectPart" ref="projectPartDataForm" :inline="true" label-position="top">
  1338. <el-form-item label="物料编码" prop="testPartNo">
  1339. <el-input v-model="projectPart.testPartNo" clearable/>
  1340. </el-form-item>
  1341. <el-form-item label="物料名称" prop="partDesc">
  1342. <el-input v-model="projectPart.partDesc" clearable/>
  1343. </el-form-item>
  1344. <el-form-item label="IFS物料编码" prop="finalPartNo">
  1345. <el-input v-model="projectPart.finalPartNo" clearable/>
  1346. </el-form-item>
  1347. <el-form-item label="客户物料编码" prop="customerPartNo">
  1348. <el-input v-model="projectPart.customerPartNo" clearable/>
  1349. </el-form-item>
  1350. <el-form-item label=" ">
  1351. <el-button @click="getProjectPartList" type="primary"> </el-button>
  1352. </el-form-item>
  1353. </el-form>
  1354. <el-table height="300px" v-loading="partQueryLoading" stripe border @row-dblclick="dblClickProjectPartTable" :data="projectPartList" ref="projectPartDataTable" :style="{marginTop:'10px'}">
  1355. <el-table-column
  1356. v-for="(item,index) in projectPartColumns" :key="index"
  1357. :sortable="item.columnSortable"
  1358. :prop="item.columnProp"
  1359. :header-align="item.headerAlign"
  1360. :show-overflow-tooltip="item.showOverflowTooltip"
  1361. :align="item.align"
  1362. :fixed="item.fixed===''?false:item.fixed"
  1363. :min-width="item.columnWidth"
  1364. :label="item.columnLabel">
  1365. <template slot-scope="scope">
  1366. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1367. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1368. </template>
  1369. </el-table-column>
  1370. </el-table>
  1371. <el-pagination style="margin-top: 0"
  1372. @size-change="handleSizeChange"
  1373. @current-change="handleCurrentChange"
  1374. :current-page="pageNo"
  1375. :page-sizes="[20, 50, 100, 200, 500]"
  1376. :page-size="pageSize"
  1377. :total="pageTotal"
  1378. layout="total,sizes, prev, pager, next, jumper">
  1379. </el-pagination>
  1380. </el-dialog>
  1381. <el-dialog title="复制明细" v-drag append-to-body :close-on-click-modal="false" :visible.sync="againVisible" width="400px">
  1382. <el-form :model="againRow" label-position="top" ref="againForm" :rules="saveQuoteDetailRules">
  1383. <el-row :gutter="10">
  1384. <el-col :span="8">
  1385. <el-form-item label="物料编码" prop="partNo" :show-message="false">
  1386. <el-input v-model="againRow.partNo" disabled @change="handlePartNoBlur"></el-input>
  1387. </el-form-item>
  1388. </el-col>
  1389. <el-col :span="16">
  1390. <el-form-item label="物料名称" prop="partDesc" :show-message="false">
  1391. <el-input v-model="againRow.partDesc" disabled></el-input>
  1392. </el-form-item>
  1393. </el-col>
  1394. <el-col :span="8">
  1395. <el-form-item label="MOQ" prop="qty" :show-message="false">
  1396. <el-input-number style="width: 100%;" v-model="againRow.qty" :min="1" :step="0" :precision="0" :controls="false"></el-input-number>
  1397. </el-form-item>
  1398. </el-col>
  1399. <el-col :span="8">
  1400. <el-form-item label="币种" prop="currency1" :show-message="false">
  1401. <dict-data-select style="width: 100%" dict-type="plm_customer_information_customer_customer_currency" v-model="againRow.currency1"></dict-data-select>
  1402. </el-form-item>
  1403. </el-col>
  1404. </el-row>
  1405. </el-form>
  1406. <div slot="footer" class="dialog-footer">
  1407. <el-button type="primary" :loading="saveLoading" @click="againQuoteDetail"> </el-button>
  1408. <el-button @click="againVisible = false"> </el-button>
  1409. </div>
  1410. </el-dialog>
  1411. <!-- <part-table v-if="saveVisible" v-model="partVisible" :is-page="true" :part-no="saveQuoteDetail.partNo" @dblclick="handleDblClick"></part-table>-->
  1412. <!-- <project-part-table v-if="saveVisible" v-model="partVisible" :project-no="saveQuoteDetail.projectNo" :part-no="saveQuoteDetail.partNo" @dblclick="handleDblClick"></project-part-table>-->
  1413. </div>
  1414. </template>
  1415. <style scoped>
  1416. .el-table /deep/ .cell{
  1417. height: auto;
  1418. line-height: 1.5;
  1419. }
  1420. .auto /deep/ .el-form-item__content{
  1421. height: auto;
  1422. line-height: 1.5;
  1423. }
  1424. .radio /deep/ .el-radio__label{
  1425. display: none;
  1426. }
  1427. </style>