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.

1315 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
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
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year 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
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year 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 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <script>
  2. import {
  3. deleteQuotationDetail,
  4. insertQuotationDetail,
  5. searchQuotationDetailPageByHeaderId, updateQuotationDetail, updateQuoteDetailStatus
  6. } from "../../../../api/quotation/quotationHeader";
  7. import {getProjectPart, getProjectPartList} from "../../../../api/project/project";
  8. import ToolQuotation from "./quotationDetail/toolQuotation.vue";
  9. import PropertyTemplates from "./quotationDetail/propertyTemplates.vue";
  10. import CostPrice from "./quotationDetail/costPrice.vue";
  11. import BillOfMateriel from "./quotationDetail/billOfMateriel.vue";
  12. import {Decimal} from "decimal.js";
  13. import {searchQuoteBomHeader, searchQuoteBomList} from "../../../../api/quotation/quoteOfBom";
  14. import QuoteRouting from "./quotationDetail/quoteRouting.vue";
  15. import {searchQuoteRoutingHeader} from "../../../../api/quotation/quoteOfRouting";
  16. import {queryQuoteDetailBom, queryQuoteDetailRouting} from "../../../../api/quotation/quote";
  17. import QuoteDetailProperties from "./quotationDetail/quoteDetailProperties.vue";
  18. export default {
  19. name:'quoteDetail',
  20. components: {QuoteDetailProperties, QuoteRouting, BillOfMateriel, CostPrice, PropertyTemplates, ToolQuotation},
  21. props:{
  22. header:{
  23. type:Object,
  24. request:true,
  25. },
  26. height:{
  27. type:[Number,String],
  28. default:'32vh',
  29. },
  30. },
  31. watch:{
  32. header:function (){
  33. this.initData()
  34. },
  35. update(){
  36. // 当bom触发修改版本时触发
  37. this.searchQuoteRoutingHeader();
  38. }
  39. },
  40. data(){
  41. const validateProductNo = (rule, value, callback) =>{
  42. if (this.quotationDetailFlag !== true && this.quotationLeadIntoDetailFlag !== true){
  43. return;
  44. }
  45. if (value === '' || value === null || value === undefined){
  46. callback(new Error(' '))
  47. return
  48. }
  49. let params = {...this.projectPartData}
  50. params.testPartNo = value
  51. getProjectPart(params).then(({data})=>{
  52. if (data && data.rows.length >= 1){
  53. callback()
  54. }else {
  55. this.projectPartData.testPartNo = undefined;
  56. this.$message.error("产品编码不存在!")
  57. callback(new Error(" "))
  58. }
  59. }).catch((error)=>{
  60. this.projectPartData.testPartNo = undefined
  61. callback(new Error(' '))
  62. })
  63. };
  64. return{
  65. allSearchFlagBom:false,
  66. allSearchFlagRouting:false,
  67. BOMCost:0,
  68. ToolCost:0,
  69. machineCost:0,
  70. laborCost:0,
  71. manufacturingCost:0,
  72. packInfoCost:0,
  73. shippingInfoCost:0,
  74. loadingStatus:false,
  75. update:0,
  76. index:'',
  77. insertQuotationDetailLoading:false,
  78. projectPartDialogFlag:false,
  79. quotationLeadIntoDetailFlag:false,
  80. initQuotationDetailLoading:false,
  81. quotationDetailFlag:false,
  82. editQuotationDetailLoading:false,
  83. no: 1,//当前页
  84. size: 50,//每页条数
  85. total: 0,//总条数
  86. tableData:[],
  87. projectPartTable:[],
  88. columnList: [
  89. {
  90. userId: this.$store.state.user.name,
  91. functionId: 102003,
  92. serialNumber: '102003Table2ProductNo',
  93. tableId: '102003Table2',
  94. tableName: '报价详情信息表',
  95. columnProp: 'productNo',
  96. headerAlign: 'center',
  97. align: 'left',
  98. columnLabel: '产品编码',
  99. columnHidden: false,
  100. columnImage: false,
  101. columnSortable: false,
  102. sortLv: 0,
  103. status: true,
  104. fixed: '',
  105. columnWidth: 200
  106. },
  107. {
  108. userId: this.$store.state.user.name,
  109. functionId: 102003,
  110. serialNumber: '102003Table2ProductDesc',
  111. tableId: '102003Table2',
  112. tableName: '报价详情信息表',
  113. columnProp: 'productDesc',
  114. headerAlign: 'center',
  115. align: 'left',
  116. columnLabel: '产品名称',
  117. columnHidden: false,
  118. columnImage: false,
  119. columnSortable: false,
  120. sortLv: 0,
  121. status: true,
  122. fixed: '',
  123. columnWidth: 200
  124. },
  125. {
  126. userId: this.$store.state.user.name,
  127. functionId: 102003,
  128. serialNumber: '102003Table2QuotationDetailQuantity',
  129. tableId: '102003Table2',
  130. tableName: '报价详情信息表',
  131. columnProp: 'quotationDetailQuantity',
  132. headerAlign: 'center',
  133. align: 'right',
  134. columnLabel: 'MOQ',
  135. columnHidden: false,
  136. columnImage: false,
  137. columnSortable: false,
  138. sortLv: 0,
  139. status: true,
  140. fixed: '',
  141. columnWidth: 100
  142. },
  143. {
  144. userId: this.$store.state.user.name,
  145. functionId: 102003,
  146. serialNumber: '102003Table2ComputePartCost',
  147. tableId: '102003Table2',
  148. tableName: '报价详情信息表',
  149. columnProp: 'computePartCost',
  150. headerAlign: 'center',
  151. align: 'right',
  152. columnLabel: '计算后材料成本',
  153. columnHidden: false,
  154. columnImage: false,
  155. columnSortable: false,
  156. sortLv: 0,
  157. status: true,
  158. fixed: '',
  159. columnWidth: 120
  160. },{
  161. userId: this.$store.state.user.name,
  162. functionId: 102003,
  163. serialNumber: '102003Table2ComputeMachineCost',
  164. tableId: '102003Table2',
  165. tableName: '报价详情信息表',
  166. columnProp: 'computeMachineCost',
  167. headerAlign: 'center',
  168. align: 'right',
  169. columnLabel: '计算后机器成本',
  170. columnHidden: false,
  171. columnImage: false,
  172. columnSortable: false,
  173. sortLv: 0,
  174. status: true,
  175. fixed: '',
  176. columnWidth: 120
  177. },{
  178. userId: this.$store.state.user.name,
  179. functionId: 102003,
  180. serialNumber: '102003Table2ComputeLabourCost',
  181. tableId: '102003Table2',
  182. tableName: '报价详情信息表',
  183. columnProp: 'computeLabourCost',
  184. headerAlign: 'center',
  185. align: 'right',
  186. columnLabel: '计算后人工成本',
  187. columnHidden: false,
  188. columnImage: false,
  189. columnSortable: false,
  190. sortLv: 0,
  191. status: true,
  192. fixed: '',
  193. columnWidth: 120
  194. },
  195. {
  196. userId: this.$store.state.user.name,
  197. functionId: 102003,
  198. serialNumber: '102003Table2ComputeFabricateCost',
  199. tableId: '102003Table2',
  200. tableName: '报价详情信息表',
  201. columnProp: 'computeFabricateCost',
  202. headerAlign: 'center',
  203. align: 'right',
  204. columnLabel: '计算后制造费用',
  205. columnHidden: false,
  206. columnImage: false,
  207. columnSortable: false,
  208. sortLv: 0,
  209. status: true,
  210. fixed: '',
  211. columnWidth: 120
  212. },
  213. {
  214. userId: this.$store.state.user.name,
  215. functionId: 102003,
  216. serialNumber: '102003Table2ComputeToolCost',
  217. tableId: '102003Table2',
  218. tableName: '报价详情信息表',
  219. columnProp: 'computeToolCost',
  220. headerAlign: 'center',
  221. align: 'right',
  222. columnLabel: '计算后工具成本',
  223. columnHidden: false,
  224. columnImage: false,
  225. columnSortable: false,
  226. sortLv: 0,
  227. status: true,
  228. fixed: '',
  229. columnWidth: 120
  230. },
  231. {
  232. userId: this.$store.state.user.name,
  233. functionId: 102003,
  234. serialNumber: '102003Table2AdjustPartCost',
  235. tableId: '102003Table2',
  236. tableName: '报价详情信息表',
  237. columnProp: 'adjustPartCost',
  238. headerAlign: 'center',
  239. align: 'right',
  240. columnLabel: '调整后材料成本',
  241. columnHidden: false,
  242. columnImage: false,
  243. columnSortable: false,
  244. sortLv: 0,
  245. status: true,
  246. fixed: '',
  247. columnWidth: 120
  248. },
  249. {
  250. userId: this.$store.state.user.name,
  251. functionId: 102003,
  252. serialNumber: '102003Table2AdjustMachineCost',
  253. tableId: '102003Table2',
  254. tableName: '报价详情信息表',
  255. columnProp: 'adjustMachineCost',
  256. headerAlign: 'center',
  257. align: 'right',
  258. columnLabel: '调整后机器成本',
  259. columnHidden: false,
  260. columnImage: false,
  261. columnSortable: false,
  262. sortLv: 0,
  263. status: true,
  264. fixed: '',
  265. columnWidth: 120
  266. },
  267. {
  268. userId: this.$store.state.user.name,
  269. functionId: 102003,
  270. serialNumber: '102003Table2AdjustLabourCost',
  271. tableId: '102003Table2',
  272. tableName: '报价详情信息表',
  273. columnProp: 'adjustLabourCost',
  274. headerAlign: 'center',
  275. align: 'right',
  276. columnLabel: '调整后人工成本',
  277. columnHidden: false,
  278. columnImage: false,
  279. columnSortable: false,
  280. sortLv: 0,
  281. status: true,
  282. fixed: '',
  283. columnWidth: 120
  284. },
  285. {
  286. userId: this.$store.state.user.name,
  287. functionId: 102003,
  288. serialNumber: '102003Table2AdjustFabricateCost',
  289. tableId: '102003Table2',
  290. tableName: '报价详情信息表',
  291. columnProp: 'adjustFabricateCost',
  292. headerAlign: 'center',
  293. align: 'right',
  294. columnLabel: '调整后制造费用',
  295. columnHidden: false,
  296. columnImage: false,
  297. columnSortable: false,
  298. sortLv: 0,
  299. status: true,
  300. fixed: '',
  301. columnWidth: 120
  302. },{
  303. userId: this.$store.state.user.name,
  304. functionId: 102003,
  305. serialNumber: '102003Table2AdjustToolCost',
  306. tableId: '102003Table2',
  307. tableName: '报价详情信息表',
  308. columnProp: 'adjustToolCost',
  309. headerAlign: 'center',
  310. align: 'right',
  311. columnLabel: '调整后工具成本',
  312. columnHidden: false,
  313. columnImage: false,
  314. columnSortable: false,
  315. sortLv: 0,
  316. status: true,
  317. fixed: '',
  318. columnWidth: 120
  319. },{
  320. userId: this.$store.state.user.name,
  321. functionId: 102003,
  322. serialNumber: '102003Table2DetailOtherCost',
  323. tableId: '102003Table2',
  324. tableName: '报价详情信息表',
  325. columnProp: 'detailOtherCost',
  326. headerAlign: 'center',
  327. align: 'right',
  328. columnLabel: '其他成本',
  329. columnHidden: false,
  330. columnImage: false,
  331. columnSortable: false,
  332. sortLv: 0,
  333. status: true,
  334. fixed: '',
  335. columnWidth: 120
  336. },{
  337. userId: this.$store.state.user.name,
  338. functionId: 102003,
  339. serialNumber: '102003Table2DetailManageCost',
  340. tableId: '102003Table2',
  341. tableName: '报价详情信息表',
  342. columnProp: 'detailManageCost',
  343. headerAlign: 'center',
  344. align: 'right',
  345. columnLabel: '管理成本',
  346. columnHidden: false,
  347. columnImage: false,
  348. columnSortable: false,
  349. sortLv: 0,
  350. status: true,
  351. fixed: '',
  352. columnWidth: 120
  353. },{
  354. userId: this.$store.state.user.name,
  355. functionId: 102003,
  356. serialNumber: '102003Table2DetailTotalCost',
  357. tableId: '102003Table2',
  358. tableName: '报价详情信息表',
  359. columnProp: 'detailTotalCost',
  360. headerAlign: 'center',
  361. align: 'right',
  362. columnLabel: '总成本',
  363. columnHidden: false,
  364. columnImage: false,
  365. columnSortable: false,
  366. sortLv: 0,
  367. status: true,
  368. fixed: '',
  369. columnWidth: 120
  370. },{
  371. userId: this.$store.state.user.name,
  372. functionId: 102003,
  373. serialNumber: '102003Table2DetailProfitRate',
  374. tableId: '102003Table2',
  375. tableName: '报价详情信息表',
  376. columnProp: 'detailProfitRate',
  377. headerAlign: 'center',
  378. align: 'right',
  379. columnLabel: '利润率%',
  380. columnHidden: false,
  381. columnImage: false,
  382. columnSortable: false,
  383. sortLv: 0,
  384. status: true,
  385. fixed: '',
  386. columnWidth: 120
  387. },{
  388. userId: this.$store.state.user.name,
  389. functionId: 102003,
  390. serialNumber: '102003Table2DetailProfitAmount',
  391. tableId: '102003Table2',
  392. tableName: '报价详情信息表',
  393. columnProp: 'detailProfitAmount',
  394. headerAlign: 'center',
  395. align: 'right',
  396. columnLabel: '利润额',
  397. columnHidden: false,
  398. columnImage: false,
  399. columnSortable: false,
  400. sortLv: 0,
  401. status: true,
  402. fixed: '',
  403. columnWidth: 120
  404. },{
  405. userId: this.$store.state.user.name,
  406. functionId: 102003,
  407. serialNumber: '102003Table2FinalUntaxedPrice',
  408. tableId: '102003Table2',
  409. tableName: '报价详情信息表',
  410. columnProp: 'finalUntaxedPrice',
  411. headerAlign: 'center',
  412. align: 'right',
  413. columnLabel: '未税单价',
  414. columnHidden: false,
  415. columnImage: false,
  416. columnSortable: false,
  417. sortLv: 0,
  418. status: true,
  419. fixed: '',
  420. columnWidth: 120
  421. },{
  422. userId: this.$store.state.user.name,
  423. functionId: 102003,
  424. serialNumber: '102003Table2TaxRate',
  425. tableId: '102003Table2',
  426. tableName: '报价详情信息表',
  427. columnProp: 'taxRate',
  428. headerAlign: 'center',
  429. align: 'right',
  430. columnLabel: '税率%',
  431. columnHidden: false,
  432. columnImage: false,
  433. columnSortable: false,
  434. sortLv: 0,
  435. status: true,
  436. fixed: '',
  437. columnWidth: 120
  438. },{
  439. userId: this.$store.state.user.name,
  440. functionId: 102003,
  441. serialNumber: '102003Table2FinalTaxedPrice',
  442. tableId: '102003Table2',
  443. tableName: '报价详情信息表',
  444. columnProp: 'finalTaxedPrice',
  445. headerAlign: 'center',
  446. align: 'right',
  447. columnLabel: '含税单价',
  448. columnHidden: false,
  449. columnImage: false,
  450. columnSortable: false,
  451. sortLv: 0,
  452. status: true,
  453. fixed: '',
  454. columnWidth: 120
  455. },{
  456. userId: this.$store.state.user.name,
  457. functionId: 102003,
  458. serialNumber: '102003Table2SystemComputePrice',
  459. tableId: '102003Table2',
  460. tableName: '报价详情信息表',
  461. columnProp: 'systemComputePrice',
  462. headerAlign: 'center',
  463. align: 'right',
  464. columnLabel: '含税总价',
  465. columnHidden: false,
  466. columnImage: false,
  467. columnSortable: false,
  468. sortLv: 0,
  469. status: true,
  470. fixed: '',
  471. columnWidth: 120
  472. },{
  473. userId: this.$store.state.user.name,
  474. functionId: 102003,
  475. serialNumber: '102003Table2QuotationDetailStatus',
  476. tableId: '102003Table2',
  477. tableName: '报价详情信息表',
  478. columnProp: 'quotationDetailStatus',
  479. headerAlign: 'center',
  480. align: 'center',
  481. columnLabel: '状态',
  482. columnHidden: false,
  483. columnImage: false,
  484. columnSortable: false,
  485. sortLv: 0,
  486. status: true,
  487. fixed: '',
  488. columnWidth: 120
  489. },{
  490. userId: this.$store.state.user.name,
  491. functionId: 102003,
  492. serialNumber: '102003Table2Remark',
  493. tableId: '102003Table2',
  494. tableName: '报价详情信息表',
  495. columnProp: 'remark',
  496. headerAlign: 'center',
  497. align: 'left',
  498. columnLabel: '备注',
  499. columnHidden: false,
  500. columnImage: false,
  501. columnSortable: false,
  502. sortLv: 0,
  503. status: true,
  504. fixed: '',
  505. columnWidth: 120
  506. },{
  507. userId: this.$store.state.user.name,
  508. functionId: 102003,
  509. serialNumber: '102003Table2InternalInquiryNo',
  510. tableId: '102003Table2',
  511. tableName: '报价详情信息表',
  512. columnProp: 'internalInquiryNo',
  513. headerAlign: 'center',
  514. align: 'left',
  515. columnLabel: '询价单号',
  516. columnHidden: false,
  517. columnImage: false,
  518. columnSortable: false,
  519. sortLv: 0,
  520. status: true,
  521. fixed: '',
  522. columnWidth: 120
  523. },
  524. // {
  525. // userId: this.$store.state.user.name,
  526. // functionId: 102003,
  527. // serialNumber: '102003Table2QuotationDetailCount',
  528. // tableId: '102003Table2',
  529. // tableName: '报价详情信息表',
  530. // columnProp: 'quotationDetailCount',
  531. // headerAlign: 'center',
  532. // align: 'right',
  533. // columnLabel: '报价次数',
  534. // columnHidden: false,
  535. // columnImage: false,
  536. // columnSortable: false,
  537. // sortLv: 0,
  538. // status: true,
  539. // fixed: '',
  540. // columnWidth: 120
  541. // },
  542. ],
  543. projectPartDetailList: [
  544. {
  545. userId: this.$store.state.user.name,
  546. functionId: 102003,
  547. serialNumber: '102003Table3TestPartNo',
  548. tableId: '102003Table3',
  549. tableName: '项目物料表',
  550. columnProp: 'testPartNo',
  551. headerAlign: 'center',
  552. align: 'center',
  553. columnLabel: '产品编码',
  554. columnHidden: false,
  555. columnImage: false,
  556. columnSortable: false,
  557. sortLv: 0,
  558. status: true,
  559. fixed: '',
  560. columnWidth: 150
  561. },
  562. {
  563. userId: this.$store.state.user.name,
  564. functionId: 102003,
  565. serialNumber: '102003Table3PartDesc',
  566. tableId: '102003Table3',
  567. tableName: '项目物料表',
  568. columnProp: 'partDesc',
  569. headerAlign: 'center',
  570. align: 'center',
  571. columnLabel: '产品名称',
  572. columnHidden: false,
  573. columnImage: false,
  574. columnSortable: false,
  575. sortLv: 0,
  576. status: true,
  577. fixed: '',
  578. columnWidth: 120
  579. },
  580. {
  581. userId: this.$store.state.user.name,
  582. functionId: 102003,
  583. serialNumber: '102003Table3CustomerPartNo',
  584. tableId: '102003Table3',
  585. tableName: '项目物料表',
  586. columnProp: 'customerPartNo',
  587. headerAlign: 'center',
  588. align: 'center',
  589. columnLabel: '客户料号',
  590. columnHidden: false,
  591. columnImage: false,
  592. columnSortable: false,
  593. sortLv: 0,
  594. status: true,
  595. fixed: '',
  596. columnWidth: 150
  597. },
  598. {
  599. userId: this.$store.state.user.name,
  600. functionId: 102003,
  601. serialNumber: '102003Table3FinalPartNo',
  602. tableId: '102003Table3',
  603. tableName: '项目物料表',
  604. columnProp: 'finalPartNo',
  605. headerAlign: 'center',
  606. align: 'center',
  607. columnLabel: '正式料号',
  608. columnHidden: false,
  609. columnImage: false,
  610. columnSortable: false,
  611. sortLv: 0,
  612. status: true,
  613. fixed: '',
  614. columnWidth: 150
  615. },
  616. {
  617. userId: this.$store.state.user.name,
  618. functionId: 102001,
  619. serialNumber: '102001Table3Type',
  620. tableId: '102001Table3',
  621. tableName: '项目物料表',
  622. columnProp: 'type',
  623. headerAlign: 'center',
  624. align: 'center',
  625. columnLabel: '制造类型',
  626. columnHidden: false,
  627. columnImage: false,
  628. columnSortable: false,
  629. sortLv: 0,
  630. status: true,
  631. fixed: '',
  632. columnWidth: 120
  633. },
  634. {
  635. userId: this.$store.state.user.name,
  636. functionId: 102001,
  637. serialNumber: '102001Table3UmId',
  638. tableId: '102001Table3',
  639. tableName: '项目物料表',
  640. columnProp: 'umId',
  641. headerAlign: 'center',
  642. align: 'center',
  643. columnLabel: '单位',
  644. columnHidden: false,
  645. columnImage: false,
  646. columnSortable: false,
  647. sortLv: 0,
  648. status: true,
  649. fixed: '',
  650. columnWidth: 100
  651. },
  652. ],
  653. //报价明细新增对象
  654. quotationDetail: {
  655. quotationDetailId: undefined,//主键
  656. quotationHeaderId: undefined,//父编号
  657. site: this.$store.state.user.site,// 工厂编号
  658. productNo: undefined,//产品编码
  659. productDesc: undefined,//产品名称
  660. quotationDetailQuantity: 1,//MOQ
  661. internalInquiryNo: undefined,//内部询价单号
  662. itemNo:0,//序号
  663. quotationDetailStatus: "草稿",//报价状态
  664. taxRate: 13,//税率
  665. remark: undefined,//备注
  666. flag:false
  667. },
  668. projectPartData:{
  669. site:this.$store.state.user.site,
  670. testPartNo:undefined,// 项目编号
  671. partDesc:undefined,// 项目名称
  672. finalPartNo:undefined,// 正式料号
  673. customerPartNo:undefined,// 客户料号
  674. },
  675. fullscreen:false,
  676. // 报价明细 参数列表
  677. quotationDetailColumns: [
  678. {label: "productDesc", value: "产品名称"},
  679. {label: "quotationDetailQuantity", value: "MOQ"},
  680. {label: "internalInquiryNo", value: "内部询价单号"},
  681. {label: "quotationDetailStatus", value: "报价状态"},
  682. {label: "itemNo", value: "序号"},
  683. {label: "adjustPartCost", value: "调整后的材料成本"},
  684. {label: "adjustMachineCost", value: "调整后的机器成本"},
  685. {label: "adjustFabricateCost", value: "调整后的制造费用"},
  686. {label: "adjustLabourCost", value: "调整后人的工成本"},
  687. {label: "adjustToolCost", value: "调整后的工具成本"},
  688. {label: "detailManageCost", value: "管理成本"},
  689. {label: "detailOtherCost", value: "其他成本"},
  690. {label: "detailProfitRate", value: "利润率"},
  691. {label: "finalUntaxedPrice", value: "未税单价"},
  692. {label: "taxRate", value: "税率"},
  693. ],
  694. // 报价详情表单校验
  695. quotationDetailRules: {
  696. productNo: [{required: true,validator:validateProductNo,trigger: 'change'}],
  697. productDesc: [{required: true, message: ' ', trigger: ['change','blur']}],
  698. quotationDetailStatus: [{required: true, message: ' ', trigger: 'change'}],
  699. internalInquiryNo: [{required: true, message: ' ', trigger: ['change','blur']}],
  700. itemNo:[{required: true, message: ' ', trigger: ['change','blur']}],
  701. quotationDetailQuantity: [{required: true, message: ' ', trigger: ['change','blur']}],
  702. },
  703. activeName:'bom',
  704. }
  705. },
  706. methods:{
  707. // 报价详情size 改变
  708. detailSizeChange(val) {
  709. this.size = val;
  710. this.initData();
  711. },
  712. // 报价详情 页码
  713. detailCurrentChange(val) {
  714. this.no = val;
  715. this.initData();
  716. },
  717. // 查询报价明细
  718. initData() {
  719. let params = {
  720. no: this.no,
  721. size: this.size,
  722. quotationHeaderId: this.header.quotationHeaderId
  723. }
  724. this.tableData = [];
  725. this.initQuotationDetailLoading = true;
  726. searchQuotationDetailPageByHeaderId(params).then(({data}) => {
  727. this.initQuotationDetailLoading = false;
  728. if (data && data.code === 200) {
  729. this.tableData = data.data.records;
  730. this.total = data.data.total;
  731. }else {
  732. this.tableData = [];
  733. this.total = 0;
  734. }
  735. }).catch((error)=>{
  736. this.initQuotationDetailLoading = false;
  737. })
  738. },
  739. // 修改 报价详情
  740. editQuotationDetail(row,index) {
  741. if (index < 10){
  742. this.index = "00"+index;
  743. }else if (index%10 <= 10){
  744. this.index = "0"+index;
  745. }else if (index%100 <= 10){
  746. this.index = index
  747. }
  748. this.quotationDetail = JSON.parse(JSON.stringify(row));
  749. this.quotationDetailFlag = true;
  750. },
  751. // 删除 报价明细
  752. deleteQuotationDetailData(row){
  753. this.$confirm('确定要删除该记录吗?', '提示', {
  754. confirmButtonText: '确定',
  755. cancelButtonText: '取消',
  756. type: 'warning'
  757. }).then(() => {
  758. deleteQuotationDetail(row).then(({data})=>{
  759. if (data.code === 200){
  760. this.initData();
  761. this.$message.success(data.msg);
  762. }else {
  763. this.$message.error(data.msg);
  764. }
  765. })
  766. })
  767. },
  768. openInsertQuotationDetail() {
  769. this.quotationDetail.quotationHeaderId = this.header.quotationHeaderId;
  770. this.quotationDetail.internalInquiryNo = this.header.internalInquiryNo;
  771. },
  772. closeInsertQuotationDetail() {
  773. this.$refs['insertQuotationDetailForm'].resetFields();
  774. this.resetQuotationDetail();
  775. },
  776. resetQuotationDetail(){
  777. this.quotationDetail = {
  778. quotationDetailId: undefined,//主键
  779. quotationHeaderId: undefined,//父编号
  780. site: this.$store.state.user.site,// 工厂编号
  781. productNo: undefined,//产品编码
  782. productDesc: undefined,//产品名称
  783. quotationDetailQuantity: 1,//MOQ
  784. internalInquiryNo: undefined,//内部询价单号
  785. itemNo:0,//序号
  786. quotationDetailStatus: "草稿",//报价状态
  787. taxRate: 13,//税率
  788. remark: undefined,//备注
  789. flag:false
  790. };
  791. },
  792. insertQuotationDetailBtn() {
  793. this.$refs['insertQuotationDetailForm'].validate((validate, objects) => {
  794. if (validate) {
  795. this.insertQuotationDetailLoading = true;
  796. insertQuotationDetail(this.quotationDetail).then(({data}) => {
  797. this.insertQuotationDetailLoading = false;
  798. if (data.code === 200) {
  799. // 保存成功后
  800. if (this.quotationDetail.flag) {
  801. this.$nextTick(()=>{
  802. this.quotationDetail = JSON.parse(JSON.stringify(data.data));
  803. })
  804. this.quotationDetailFlag = true;
  805. }else {
  806. this.quotationLeadIntoDetailFlag = false;
  807. }
  808. this.initData();
  809. this.$message.success(data.msg);
  810. } else {
  811. this.$message.error(data.msg);
  812. }
  813. }).catch((error)=>{
  814. this.insertQuotationDetailLoading = false;
  815. })
  816. } else {
  817. this.rulesValidateLabel(objects, this.quotationDetailColumns);
  818. }
  819. })
  820. },
  821. // 校验处理
  822. rulesValidateLabel(objects, labels) {
  823. for (let filed in objects) {
  824. for (let i = 0; i < labels.length; i++) {
  825. let quotationToolColumn = labels[i];
  826. if (quotationToolColumn.label === filed) {
  827. this.$message.warning(quotationToolColumn.value+"为空或填写不正确");
  828. return
  829. }
  830. }
  831. }
  832. },
  833. closeProjectPartDialog(){
  834. this.projectPartData = {
  835. site:this.$store.state.user.site,
  836. testPartNo:undefined,// 项目编号
  837. partDesc:undefined,// 项目名称
  838. finalPartNo:undefined,// 正式料号
  839. customerPartNo:undefined,// 客户料号
  840. }
  841. this.projectPartTable = [];
  842. },
  843. openProjectPartDialog(){
  844. this.getProjectPartList();
  845. },
  846. getProjectPartList(){
  847. let params = {...this.projectPartData}
  848. params.projectId = this.header.projectId
  849. getProjectPartList(params).then(({data})=>{
  850. if (data && data.code === 0){
  851. this.projectPartTable = data.rows;
  852. }
  853. })
  854. },
  855. blurProjectHandle(){
  856. let params = {
  857. site:this.$store.state.user.site,
  858. testPartNo:this.quotationDetail.productNo,
  859. projectId: this.header.projectId
  860. }
  861. getProjectPartList(params).then(({data})=>{
  862. if (data && data.code === 0){
  863. if (data.rows && data.rows.length === 1){
  864. this.dblClickProjectPartTable(data.rows[0])
  865. }
  866. }
  867. })
  868. },
  869. // 项目物料双击事件
  870. dblClickProjectPartTable(row){
  871. this.quotationDetail.productNo = row.testPartNo;
  872. this.quotationDetail.productDesc = row.partDesc;
  873. this.projectPartDialogFlag = false;
  874. },
  875. closeDetailEditDialog(){
  876. this.activeName = 'bom'
  877. this.fullscreen = false;
  878. this.resetQuotationDetail();
  879. this.$refs.cost.restCostForm()
  880. // 关闭新增弹框
  881. this.quotationLeadIntoDetailFlag = false;
  882. },
  883. openQuotationDetail(){
  884. this.$nextTick(()=>{
  885. // this.$refs.property.getPropertyTemplatesItem();// 属性
  886. this.$refs.tool.initQuotationToolData();//刀具
  887. this.searchQuoteBomList();//bom
  888. })
  889. },
  890. searchQuoteRoutingHeader(){
  891. let params = {
  892. site:this.$store.state.user.site,
  893. quoteDetailId:this.quotationDetail.quotationDetailId,
  894. testPartNo:this.quotationDetail.productNo
  895. }
  896. searchQuoteRoutingHeader(params).then(({data})=>{
  897. if (data && data.code === 0){
  898. let row = data.row
  899. let arr = [];
  900. if (row){
  901. arr[0] = row.version;
  902. arr[1] = row.alternativeNo;
  903. arr[2] = row.routingType;
  904. arr[3] = row.partNo;
  905. arr[4] = row.id;
  906. arr[5] = row.parentId;
  907. }
  908. this.$refs.routing.setSelectRouting(arr);
  909. }else {
  910. this.$message.warning(data.msg)
  911. }
  912. }).catch((error)=>{
  913. this.$message.error(error)
  914. })
  915. },
  916. searchQuoteBomList(){
  917. this.allSearchFlagBom = false;
  918. this.allSearchFlagRouting = false;
  919. let params = {
  920. site:this.$store.state.user.site,
  921. quoteDetailId:this.quotationDetail.quotationDetailId,
  922. testPartNo:this.quotationDetail.productNo
  923. }
  924. this.loadingStatus = true
  925. searchQuoteBomHeader(params).then(({data})=>{
  926. if (data && data.code === 0){
  927. let row = data.row
  928. let arr = [];
  929. if (row !== null){
  930. arr[0] = row.version;
  931. arr[1] = row.alternativeNo;
  932. arr[2] = row.bomType;
  933. arr[3] = row.partNo;
  934. arr[4] = row.id;
  935. arr[5] = row.parentId;
  936. }
  937. this.$refs.bom.setSelectBom(arr);
  938. this.searchQuoteRoutingHeader();// routing
  939. }else {
  940. this.$message.warning(data.msg)
  941. }
  942. }).catch((error)=>{
  943. this.$message.error(error)
  944. })
  945. },
  946. saveQuotationDetail(){
  947. if (!this.$refs.cost.ruleCostForm()) {
  948. return
  949. }
  950. let params = this.$refs.cost.getQuotationDetail();
  951. this.editQuotationDetailLoading = true;
  952. updateQuotationDetail(params).then(({data}) => {
  953. this.editQuotationDetailLoading = false;
  954. if (data.code === 200) {
  955. this.quotationDetailFlag = false;
  956. this.initData();
  957. this.$message.success(data.msg);
  958. } else {
  959. this.$message.warning(data.msg);
  960. }
  961. }).catch((error)=>{
  962. this.$message.error(error);
  963. this.editQuotationDetailLoading = false;
  964. })
  965. // this.$message.success(this.$refs.cost.getQuotationDetail())
  966. // this.quotationDetailFlag = false;
  967. },
  968. tabClick(tab){
  969. if (this.activeName === 'cost'){
  970. this.searchQuoteBomList();
  971. this.$refs.tool.initQuotationToolData();
  972. }else if (this.activeName === 'tool'){
  973. this.$refs.tool.initQuotationToolData();
  974. }
  975. },
  976. editQuotationDetailStatus(row,status){
  977. let params = {
  978. quotationDetailId:row.quotationDetailId,
  979. quotationDetailStatus:status
  980. }
  981. updateQuoteDetailStatus(params).then(({data}) => {
  982. if (data.code === 0) {
  983. this.initData();
  984. this.$message.success(data.msg);
  985. } else {
  986. this.$message.warning(data.msg);
  987. }
  988. }).catch((error)=>{
  989. this.$message.error(error);
  990. })
  991. },
  992. clickProjectHandle(){
  993. this.projectPartData.testPartNo = this.quotationDetail.productNo
  994. this.projectPartDialogFlag = true
  995. },
  996. handleToBom(row){
  997. let params = {
  998. quotationDetailId:row.quotationDetailId
  999. }
  1000. queryQuoteDetailBom(params).then(({data})=>{
  1001. if (data && data.code === 0){
  1002. if (this.$router.resolve('part-bomManagement').resolved.name === '404') {
  1003. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  1004. } else {
  1005. let result = {
  1006. partNo:'',
  1007. site:'',
  1008. }
  1009. if (!data.row){
  1010. result.partNo = row.productNo
  1011. result.site = row.site
  1012. }else {
  1013. result = {
  1014. ...data.row
  1015. }
  1016. }
  1017. this.$router.push({
  1018. name:"part-bomManagement",
  1019. params:{
  1020. type:"quote",
  1021. site:result.site,
  1022. partNo: result.partNo,
  1023. engChgLevel:result.version,
  1024. bomType: result.bomType,
  1025. }})
  1026. }
  1027. }else {
  1028. this.$message.warning(data.msg);
  1029. }
  1030. }).catch((error)=>{
  1031. this.$message.error(error);
  1032. })
  1033. },
  1034. handleToRouting(row){
  1035. let params = {
  1036. quotationDetailId:row.quotationDetailId
  1037. }
  1038. queryQuoteDetailRouting(params).then(({data})=>{
  1039. if (data && data.code === 0){
  1040. if (this.$router.resolve('part-routingManagement').resolved.name === '404') {
  1041. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  1042. } else {
  1043. let result = {
  1044. partNo:'',
  1045. site:'',
  1046. }
  1047. if (!data.row){
  1048. result.partNo = row.productNo
  1049. result.site = row.site
  1050. }else {
  1051. result = {
  1052. ...data.row
  1053. }
  1054. }
  1055. this.$router.push({
  1056. name:"part-routingManagement",
  1057. params:{
  1058. type:"quote",
  1059. site:result.site,
  1060. partNo: result.partNo,
  1061. engChgLevel:result.version,
  1062. routingType: result.routingType,
  1063. }})
  1064. }
  1065. }else {
  1066. this.$message.warning(data.msg);
  1067. }
  1068. }).catch((error)=>{
  1069. this.$message.error(error);
  1070. })
  1071. },
  1072. handleDetail(row,index){
  1073. if (index < 10){
  1074. this.index = "00"+index;
  1075. }else if (index%10 <= 10){
  1076. this.index = "0"+index;
  1077. }else if (index%100 <= 10){
  1078. this.index = index
  1079. }
  1080. this.quotationDetail = {...row};
  1081. this.quotationDetailFlag = true;
  1082. },
  1083. handleRouter(internalInquiryNo){
  1084. if (this.$router.resolve('quotation-requestForQuote').resolved.name === '404') {
  1085. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  1086. } else {
  1087. this.$router.push({
  1088. name: 'quotation-requestForQuote',
  1089. params:{
  1090. quotationNo:internalInquiryNo,
  1091. }
  1092. })
  1093. }
  1094. }
  1095. },
  1096. }
  1097. </script>
  1098. <template>
  1099. <div>
  1100. <div style="margin-bottom: 10px;padding-left: 10px">
  1101. <el-button type="primary" @click="quotationLeadIntoDetailFlag = true">新增</el-button>
  1102. </div>
  1103. <el-table v-loading="initQuotationDetailLoading" element-loading-text = "数据正在加载中"
  1104. element-loading-spinner = "el-icon-loading" :data="tableData" :height="height" border>
  1105. <el-table-column
  1106. label="操作"
  1107. fixed
  1108. width="140" align="center">
  1109. <template slot-scope="{row,$index}">
  1110. <el-link style="cursor: pointer" v-if="row.quotationDetailStatus === '草稿'" @click="editQuotationDetail(row,$index+1)">编辑</el-link>
  1111. <el-link style="cursor: pointer" v-if="row.quotationDetailStatus === '草稿'" @click="deleteQuotationDetailData(row)">删除</el-link>
  1112. <!-- <el-link style="cursor: pointer" v-if="row.quotationDetailStatus !== '草稿'" @click="handleDetail(row,$index)">详情</el-link>-->
  1113. <el-dropdown trigger="click">
  1114. <el-link style="cursor: pointer;font-size: 12px">
  1115. 更多
  1116. </el-link >
  1117. <el-dropdown-menu slot="dropdown">
  1118. <el-dropdown-item @click.native="handleToBom(row)">BOM</el-dropdown-item>
  1119. <el-dropdown-item @click.native="handleToRouting(row)">Routing</el-dropdown-item>
  1120. </el-dropdown-menu>
  1121. </el-dropdown>
  1122. </template>
  1123. </el-table-column>
  1124. <el-table-column
  1125. header-align="center"
  1126. label="序号"
  1127. width="55"
  1128. align="center"
  1129. type="index">
  1130. </el-table-column>
  1131. <el-table-column
  1132. v-for="(item,index) in columnList" :key="index"
  1133. :sortable="item.columnSortable"
  1134. :prop="item.columnProp"
  1135. :header-align="item.headerAlign"
  1136. :show-overflow-tooltip="item.showOverflowTooltip"
  1137. :align="item.align"
  1138. :fixed="item.fixed===''?false:item.fixed"
  1139. :min-width="item.columnWidth"
  1140. :label="item.columnLabel">
  1141. <template slot-scope="scope" >
  1142. <template v-if="item.columnProp === 'internalInquiryNo'">
  1143. <a @click="handleRouter(scope.row.internalInquiryNo)" v-if="scope.row[item.columnProp]">{{ scope.row[item.columnProp] }}</a>
  1144. </template>
  1145. <template v-else>
  1146. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp]}}</span>
  1147. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1148. </template>
  1149. </template>
  1150. </el-table-column>
  1151. </el-table>
  1152. <el-pagination style="margin-top: 0px"
  1153. @size-change="detailSizeChange"
  1154. @current-change="detailCurrentChange"
  1155. :current-page="no"
  1156. :page-sizes="[ 50, 100, 200, 500]"
  1157. :page-size="size"
  1158. :total="total"
  1159. layout="total,sizes, prev, pager, next, jumper">
  1160. </el-pagination>
  1161. <el-dialog title="新增报价明细" v-drag @open="openInsertQuotationDetail" @close="closeInsertQuotationDetail"
  1162. :visible.sync="quotationLeadIntoDetailFlag" width="500px" :close-on-click-modal="false">
  1163. <el-form :model="quotationDetail" ref="insertQuotationDetailForm" :rules="quotationDetailRules"
  1164. label-position="top">
  1165. <el-row :gutter="10">
  1166. <el-col :span="10">
  1167. <el-form-item label="产品编码" prop="productNo">
  1168. <span slot="label" style="" @click="clickProjectHandle"><a>产品编码</a></span>
  1169. <el-input v-model="quotationDetail.productNo" @blur="blurProjectHandle" clearable/>
  1170. </el-form-item>
  1171. </el-col>
  1172. <el-col :span="14">
  1173. <el-form-item label="产品名称" prop="productDesc">
  1174. <el-input v-model="quotationDetail.productDesc" disabled clearable/>
  1175. </el-form-item>
  1176. </el-col>
  1177. </el-row>
  1178. <el-row :gutter="10">
  1179. <el-col :span="10">
  1180. <el-form-item label="MOQ" prop="quotationDetailQuantity">
  1181. <el-input-number :min="1" v-model="quotationDetail.quotationDetailQuantity" :controls="false"></el-input-number>
  1182. </el-form-item>
  1183. </el-col>
  1184. </el-row>
  1185. <el-row>
  1186. <el-col :span="24">
  1187. <el-form-item label="">
  1188. <el-checkbox v-model="quotationDetail.flag">保存进入报价界面</el-checkbox>
  1189. </el-form-item>
  1190. </el-col>
  1191. </el-row>
  1192. <el-row>
  1193. <el-col :span="24">
  1194. <el-form-item label="备注" class="auto" style="display: block;min-height: 80px" prop="remark">
  1195. <el-input type="textarea" resize="none" v-model="quotationDetail.remark" :autosize="{minRows: 3, maxRows: 3}"/>
  1196. </el-form-item>
  1197. </el-col>
  1198. </el-row>
  1199. </el-form>
  1200. <div slot="footer" class="dialog-footer" style="height: 30px;line-height: 30px">
  1201. <el-button type="primary" :loading="insertQuotationDetailLoading" @click="insertQuotationDetailBtn"> </el-button>
  1202. <el-button @click="quotationLeadIntoDetailFlag = false"> </el-button>
  1203. </div>
  1204. </el-dialog>
  1205. <el-dialog v-drag :fullscreen="fullscreen" :visible.sync="quotationDetailFlag" @open="openQuotationDetail" @close="closeDetailEditDialog"
  1206. width="60%" top="10vh" :close-on-click-modal="false">
  1207. <div slot="title" class="medium">
  1208. <div>
  1209. <span class="el-dialog__title">报价单号 {{this.header.quotationNo+"-"+this.header.versionCode+"-"+index}}</span>
  1210. <span style="float: right;margin-right: 30px;cursor:pointer;" @click="fullscreen = !fullscreen">
  1211. <svg v-if="!fullscreen" t="1710144122404" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4774" width="16" height="16"><path d="M145.066667 85.333333h153.6c25.6 0 42.666667-17.066667 42.666666-42.666666S324.266667 0 298.666667 0H34.133333C25.6 0 17.066667 8.533333 8.533333 17.066667 0 25.6 0 34.133333 0 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666666s42.666667-17.066667 42.666666-42.666666V145.066667l230.4 230.4c17.066667 17.066667 42.666667 17.066667 59.733334 0 17.066667-17.066667 17.066667-42.666667 0-59.733334L145.066667 85.333333z m170.666666 563.2L162.133333 802.133333l-76.8 76.8V725.333333C85.333333 699.733333 68.266667 682.666667 42.666667 682.666667s-42.666667 17.066667-42.666667 42.666666v256c0 25.6 17.066667 42.666667 42.666667 42.666667h256c25.6 0 42.666667-17.066667 42.666666-42.666667s-17.066667-42.666667-42.666666-42.666666H145.066667l76.8-76.8 153.6-153.6c17.066667-17.066667 17.066667-42.666667 0-59.733334-17.066667-17.066667-42.666667-17.066667-59.733334 0z m665.6 34.133334c-25.6 0-42.666667 17.066667-42.666666 42.666666v153.6l-76.8-76.8-153.6-153.6c-17.066667-17.066667-42.666667-17.066667-59.733334 0-17.066667 17.066667-17.066667 42.666667 0 59.733334l153.6 153.6 76.8 76.8H725.333333c-25.6 0-42.666667 17.066667-42.666666 42.666666s17.066667 42.666667 42.666666 42.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666666z m0-682.666667h-256c-25.6 0-42.666667 17.066667-42.666666 42.666667s17.066667 42.666667 42.666666 42.666666h153.6l-76.8 76.8-153.6 153.6c-17.066667 17.066667-17.066667 42.666667 0 59.733334 17.066667 17.066667 42.666667 17.066667 59.733334 0l153.6-153.6 76.8-76.8v153.6c0 25.6 17.066667 42.666667 42.666666 42.666666s42.666667-17.066667 42.666667-42.666666v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z" fill="#8a8a8a" p-id="4775"></path></svg>
  1212. <svg v-else t="1710143735808" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4603" width="16" height="16"><path d="M354.133333 682.666667H256v-42.666667h170.666667v170.666667H384v-98.133334L243.2 853.333333l-29.866667-29.866666L354.133333 682.666667z m358.4 0l140.8 140.8-29.866666 29.866666-140.8-140.8V810.666667h-42.666667v-170.666667h170.666667v42.666667h-98.133334zM354.133333 384L213.333333 243.2l29.866667-29.866667L384 354.133333V256h42.666667v170.666667H256V384h98.133333z m358.4 0H810.666667v42.666667h-170.666667V256h42.666667v98.133333L823.466667 213.333333l29.866666 29.866667L712.533333 384z" fill="#444444" p-id="4604"></path></svg>
  1213. </span>
  1214. </div>
  1215. </div>
  1216. <el-form :rules="quotationDetailRules" style="margin-top: 5px" ref="quotationDetailForm"
  1217. :model="quotationDetail" label-width="80px" :inline="true" label-position="top">
  1218. <el-form-item label="产品编码" prop="productNo">
  1219. <el-input clearable disabled style="width: 200px" v-model="quotationDetail.productNo"/>
  1220. </el-form-item>
  1221. <el-form-item label="产品名称" prop="productDesc">
  1222. <el-input clearable disabled style="width: 240px" v-model="quotationDetail.productDesc"/>
  1223. </el-form-item>
  1224. <el-form-item label="MOQ" prop="quotationDetailQuantity">
  1225. <el-input-number disabled style="width: 100%;margin-top: -5px;" :min="1" v-model="quotationDetail.quotationDetailQuantity" :controls="false"></el-input-number>
  1226. </el-form-item>
  1227. <el-form-item label="备注" style="display: block;min-height: 90px;width: 63%">
  1228. <el-input type="textarea" resize="none" disabled v-model="quotationDetail.remark" :autosize="{minRows: 3, maxRows: 3}"
  1229. style="min-height: 80px" />
  1230. </el-form-item>
  1231. </el-form>
  1232. <el-tabs v-model="activeName" @tab-click="tabClick" :style="{height:`${fullscreen?740:500}px`}" border stripe>
  1233. <el-tab-pane name="bom" label="材料">
  1234. <bill-of-materiel ref="bom" :all-search-flag.sync="allSearchFlagBom" :total-cost.sync="BOMCost" :loading-status.sync="loadingStatus" :updateTree.sync="update" v-if="quotationDetailFlag" :height="fullscreen?655:415" :detail="quotationDetail"></bill-of-materiel>
  1235. </el-tab-pane>
  1236. <el-tab-pane name="routing" label="工艺">
  1237. <quote-routing ref="routing" :machine-cost.sync="machineCost" :labor-cost.sync="laborCost" :manufacturing-cost.sync="manufacturingCost" :all-search-flag.sync="allSearchFlagRouting" v-if="quotationDetailFlag" :loading-status.sync="loadingStatus" :height="fullscreen?655:415" :detail="quotationDetail"></quote-routing>
  1238. </el-tab-pane>
  1239. <el-tab-pane name="tool" label="工具">
  1240. <tool-quotation ref="tool" :total-cost.sync="ToolCost" v-if="quotationDetailFlag" :height="fullscreen?660:420" :detail="quotationDetail"></tool-quotation>
  1241. </el-tab-pane>
  1242. <el-tab-pane name="property" label="其他成本">
  1243. <quote-detail-properties :quotation-detail="quotationDetail" :pack-cost.sync="packInfoCost" :shipping-cost.sync="shippingInfoCost" v-if="quotationDetailFlag"></quote-detail-properties>
  1244. <!-- <property-templates ref="property" :pack-cost.sync="packInfoCost" :shipping-cost.sync="shippingInfoCost" v-if="quotationDetailFlag" :height="fullscreen?660:420" :detail="quotationDetail" ></property-templates>-->
  1245. </el-tab-pane>
  1246. <el-tab-pane name="cost" label="成本&价格">
  1247. <cost-price ref="cost" :tool-cost.sync="ToolCost"
  1248. :bom-cost.sync="BOMCost" :machine-cost.sync="machineCost"
  1249. :manufacturing-cost.sync="manufacturingCost"
  1250. :labor-cost.sync="laborCost"
  1251. :pack-cost.sync="packInfoCost" :shipping-cost.sync="shippingInfoCost"
  1252. :loading-status.sync="loadingStatus"
  1253. v-if="quotationDetailFlag"
  1254. :height="fullscreen?660:420"
  1255. :detail="quotationDetail"></cost-price>
  1256. </el-tab-pane>
  1257. </el-tabs>
  1258. <div slot="footer" style="padding-top: 10px">
  1259. <el-button type="primary" :loading="editQuotationDetailLoading" @click="saveQuotationDetail"> </el-button>
  1260. <el-button @click=" quotationDetailFlag= false"> </el-button>
  1261. </div>
  1262. </el-dialog>
  1263. <el-dialog v-drag title="产品列表" @close="closeProjectPartDialog" @open="openProjectPartDialog"
  1264. :visible.sync="projectPartDialogFlag">
  1265. <!--搜索条件-->
  1266. <el-form :model="projectPartData" ref="projectPartDataForm" :inline="true" label-position="top">
  1267. <el-form-item label="产品编号" prop="testPartNo">
  1268. <el-input v-model="projectPartData.testPartNo" clearable/>
  1269. </el-form-item>
  1270. <el-form-item label="产品名称" prop="partDesc">
  1271. <el-input v-model="projectPartData.partDesc" clearable/>
  1272. </el-form-item>
  1273. <el-form-item label="客户料号" prop="customerPartNo">
  1274. <el-input v-model="projectPartData.customerPartNo" clearable/>
  1275. </el-form-item>
  1276. <el-form-item label="正式料号" prop="finalPartNo">
  1277. <el-input v-model="projectPartData.finalPartNo" clearable/>
  1278. </el-form-item>
  1279. <el-form-item label=" ">
  1280. <el-button @click="getProjectPartList" type="primary"> </el-button>
  1281. </el-form-item>
  1282. </el-form>
  1283. <el-table height="300px" stripe border @row-dblclick="dblClickProjectPartTable" :data="projectPartTable" ref="projectPartDataTable" :style="{marginTop:'10px'}">
  1284. <el-table-column
  1285. v-for="(item,index) in projectPartDetailList" :key="index"
  1286. :sortable="item.columnSortable"
  1287. :prop="item.columnProp"
  1288. :header-align="item.headerAlign"
  1289. :show-overflow-tooltip="item.showOverflowTooltip"
  1290. :align="item.align"
  1291. :fixed="item.fixed===''?false:item.fixed"
  1292. :min-width="item.columnWidth"
  1293. :label="item.columnLabel">
  1294. <template slot-scope="scope">
  1295. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1296. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1297. </template>
  1298. </el-table-column>
  1299. </el-table>
  1300. </el-dialog>
  1301. </div>
  1302. </template>
  1303. <style scoped>
  1304. .el-input-number /deep/ .el-input__inner{
  1305. text-align: right;
  1306. padding-right: 5px !important;
  1307. }
  1308. </style>