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.

569 lines
17 KiB

2 years ago
2 years ago
2 years ago
  1. <script>
  2. import {queryQuoteByInquiryNo} from "../../../../api/quotation/quote";
  3. export default {
  4. name: "inquiryQuoteDetail",
  5. props:{
  6. inquiryNo:{
  7. type: String,
  8. required: true
  9. },
  10. site:{
  11. type: String,
  12. required: true
  13. },
  14. height:{
  15. type: [String,Number],
  16. default:"47vh",
  17. }
  18. },
  19. data(){
  20. return{
  21. queryLoading:false,
  22. dataList:[],
  23. columns:[
  24. {
  25. userId: this.$store.state.user.name,
  26. functionId: 102001,
  27. serialNumber: '102001Table10QuotationNo',
  28. tableId: '102001Table10',
  29. tableName: '报价详情信息表',
  30. columnProp: 'quotationNo',
  31. headerAlign: 'center',
  32. align: 'left',
  33. columnLabel: '报价单号',
  34. columnHidden: false,
  35. columnImage: false,
  36. columnSortable: false,
  37. sortLv: 0,
  38. status: true,
  39. fixed: '',
  40. columnWidth: 200
  41. },{
  42. userId: this.$store.state.user.name,
  43. functionId: 102001,
  44. serialNumber: '102001Table10QuotationDate',
  45. tableId: '102001Table10',
  46. tableName: '报价详情信息表',
  47. columnProp: 'quotationDate',
  48. headerAlign: 'center',
  49. align: 'center',
  50. columnLabel: '报价日期',
  51. columnHidden: false,
  52. columnImage: false,
  53. columnSortable: false,
  54. sortLv: 0,
  55. status: true,
  56. fixed: '',
  57. columnWidth: 200
  58. },
  59. {
  60. userId: this.$store.state.user.name,
  61. functionId: 102001,
  62. serialNumber: '102001Table10ProductNo',
  63. tableId: '102001Table10',
  64. tableName: '报价详情信息表',
  65. columnProp: 'productNo',
  66. headerAlign: 'center',
  67. align: 'left',
  68. columnLabel: '产品编码',
  69. columnHidden: false,
  70. columnImage: false,
  71. columnSortable: false,
  72. sortLv: 0,
  73. status: true,
  74. fixed: '',
  75. columnWidth: 200
  76. },
  77. {
  78. userId: this.$store.state.user.name,
  79. functionId: 102001,
  80. serialNumber: '102001Table10ProductDesc',
  81. tableId: '102001Table10',
  82. tableName: '报价详情信息表',
  83. columnProp: 'productDesc',
  84. headerAlign: 'center',
  85. align: 'left',
  86. columnLabel: '产品名称',
  87. columnHidden: false,
  88. columnImage: false,
  89. columnSortable: false,
  90. sortLv: 0,
  91. status: true,
  92. fixed: '',
  93. columnWidth: 200
  94. },
  95. {
  96. userId: this.$store.state.user.name,
  97. functionId: 102001,
  98. serialNumber: '102001Table10QuotationDetailQuantity',
  99. tableId: '102001Table10',
  100. tableName: '报价详情信息表',
  101. columnProp: 'quotationDetailQuantity',
  102. headerAlign: 'center',
  103. align: 'right',
  104. columnLabel: '报价数量',
  105. columnHidden: false,
  106. columnImage: false,
  107. columnSortable: false,
  108. sortLv: 0,
  109. status: true,
  110. fixed: '',
  111. columnWidth: 100
  112. },
  113. {
  114. userId: this.$store.state.user.name,
  115. functionId: 102001,
  116. serialNumber: '102001Table10ComputePartCost',
  117. tableId: '102001Table10',
  118. tableName: '报价详情信息表',
  119. columnProp: 'computePartCost',
  120. headerAlign: 'center',
  121. align: 'right',
  122. columnLabel: '计算后材料成本',
  123. columnHidden: false,
  124. columnImage: false,
  125. columnSortable: false,
  126. sortLv: 0,
  127. status: true,
  128. fixed: '',
  129. columnWidth: 120
  130. },{
  131. userId: this.$store.state.user.name,
  132. functionId: 102001,
  133. serialNumber: '102001Table10ComputeMachineCost',
  134. tableId: '102001Table10',
  135. tableName: '报价详情信息表',
  136. columnProp: 'computeMachineCost',
  137. headerAlign: 'center',
  138. align: 'right',
  139. columnLabel: '计算后机器成本',
  140. columnHidden: false,
  141. columnImage: false,
  142. columnSortable: false,
  143. sortLv: 0,
  144. status: true,
  145. fixed: '',
  146. columnWidth: 120
  147. },{
  148. userId: this.$store.state.user.name,
  149. functionId: 102001,
  150. serialNumber: '102001Table10ComputeLabourCost',
  151. tableId: '102001Table10',
  152. tableName: '报价详情信息表',
  153. columnProp: 'computeLabourCost',
  154. headerAlign: 'center',
  155. align: 'right',
  156. columnLabel: '计算后人工成本',
  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: 102001,
  168. serialNumber: '102001Table10ComputeFabricateCost',
  169. tableId: '102001Table10',
  170. tableName: '报价详情信息表',
  171. columnProp: 'computeFabricateCost',
  172. headerAlign: 'center',
  173. align: 'right',
  174. columnLabel: '计算后制造费用',
  175. columnHidden: false,
  176. columnImage: false,
  177. columnSortable: false,
  178. sortLv: 0,
  179. status: true,
  180. fixed: '',
  181. columnWidth: 120
  182. },
  183. {
  184. userId: this.$store.state.user.name,
  185. functionId: 102001,
  186. serialNumber: '102001Table10ComputeToolCost',
  187. tableId: '102001Table10',
  188. tableName: '报价详情信息表',
  189. columnProp: 'computeToolCost',
  190. headerAlign: 'center',
  191. align: 'right',
  192. columnLabel: '计算后工具成本',
  193. columnHidden: false,
  194. columnImage: false,
  195. columnSortable: false,
  196. sortLv: 0,
  197. status: true,
  198. fixed: '',
  199. columnWidth: 120
  200. },
  201. {
  202. userId: this.$store.state.user.name,
  203. functionId: 102001,
  204. serialNumber: '102001Table10AdjustPartCost',
  205. tableId: '102001Table10',
  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: 120
  218. },
  219. {
  220. userId: this.$store.state.user.name,
  221. functionId: 102001,
  222. serialNumber: '102001Table10AdjustMachineCost',
  223. tableId: '102001Table10',
  224. tableName: '报价详情信息表',
  225. columnProp: 'adjustMachineCost',
  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: 102001,
  240. serialNumber: '102001Table10AdjustLabourCost',
  241. tableId: '102001Table10',
  242. tableName: '报价详情信息表',
  243. columnProp: 'adjustLabourCost',
  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: 102001,
  258. serialNumber: '102001Table10AdjustFabricateCost',
  259. tableId: '102001Table10',
  260. tableName: '报价详情信息表',
  261. columnProp: 'adjustFabricateCost',
  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. userId: this.$store.state.user.name,
  274. functionId: 102001,
  275. serialNumber: '102001Table10AdjustToolCost',
  276. tableId: '102001Table10',
  277. tableName: '报价详情信息表',
  278. columnProp: 'adjustToolCost',
  279. headerAlign: 'center',
  280. align: 'right',
  281. columnLabel: '调整后工具成本',
  282. columnHidden: false,
  283. columnImage: false,
  284. columnSortable: false,
  285. sortLv: 0,
  286. status: true,
  287. fixed: '',
  288. columnWidth: 120
  289. },{
  290. userId: this.$store.state.user.name,
  291. functionId: 102001,
  292. serialNumber: '102001Table10DetailOtherCost',
  293. tableId: '102001Table10',
  294. tableName: '报价详情信息表',
  295. columnProp: 'detailOtherCost',
  296. headerAlign: 'center',
  297. align: 'right',
  298. columnLabel: '其他成本',
  299. columnHidden: false,
  300. columnImage: false,
  301. columnSortable: false,
  302. sortLv: 0,
  303. status: true,
  304. fixed: '',
  305. columnWidth: 120
  306. },{
  307. userId: this.$store.state.user.name,
  308. functionId: 102001,
  309. serialNumber: '102001Table10DetailManageCost',
  310. tableId: '102001Table10',
  311. tableName: '报价详情信息表',
  312. columnProp: 'detailManageCost',
  313. headerAlign: 'center',
  314. align: 'right',
  315. columnLabel: '管理成本',
  316. columnHidden: false,
  317. columnImage: false,
  318. columnSortable: false,
  319. sortLv: 0,
  320. status: true,
  321. fixed: '',
  322. columnWidth: 120
  323. },{
  324. userId: this.$store.state.user.name,
  325. functionId: 102001,
  326. serialNumber: '102001Table10DetailTotalCost',
  327. tableId: '102001Table10',
  328. tableName: '报价详情信息表',
  329. columnProp: 'detailTotalCost',
  330. headerAlign: 'center',
  331. align: 'right',
  332. columnLabel: '总成本',
  333. columnHidden: false,
  334. columnImage: false,
  335. columnSortable: false,
  336. sortLv: 0,
  337. status: true,
  338. fixed: '',
  339. columnWidth: 120
  340. },{
  341. userId: this.$store.state.user.name,
  342. functionId: 102001,
  343. serialNumber: '102001Table10DetailProfitRate',
  344. tableId: '102001Table10',
  345. tableName: '报价详情信息表',
  346. columnProp: 'detailProfitRate',
  347. headerAlign: 'center',
  348. align: 'right',
  349. columnLabel: '利润率%',
  350. columnHidden: false,
  351. columnImage: false,
  352. columnSortable: false,
  353. sortLv: 0,
  354. status: true,
  355. fixed: '',
  356. columnWidth: 120
  357. },{
  358. userId: this.$store.state.user.name,
  359. functionId: 102001,
  360. serialNumber: '102001Table10DetailProfitAmount',
  361. tableId: '102001Table10',
  362. tableName: '报价详情信息表',
  363. columnProp: 'detailProfitAmount',
  364. headerAlign: 'center',
  365. align: 'right',
  366. columnLabel: '利润额',
  367. columnHidden: false,
  368. columnImage: false,
  369. columnSortable: false,
  370. sortLv: 0,
  371. status: true,
  372. fixed: '',
  373. columnWidth: 120
  374. },{
  375. userId: this.$store.state.user.name,
  376. functionId: 102001,
  377. serialNumber: '102001Table10FinalUntaxedPrice',
  378. tableId: '102001Table10',
  379. tableName: '报价详情信息表',
  380. columnProp: 'finalUntaxedPrice',
  381. headerAlign: 'center',
  382. align: 'right',
  383. columnLabel: '未税单价',
  384. columnHidden: false,
  385. columnImage: false,
  386. columnSortable: false,
  387. sortLv: 0,
  388. status: true,
  389. fixed: '',
  390. columnWidth: 120
  391. },{
  392. userId: this.$store.state.user.name,
  393. functionId: 102001,
  394. serialNumber: '102001Table10TaxRate',
  395. tableId: '102001Table10',
  396. tableName: '报价详情信息表',
  397. columnProp: 'taxRate',
  398. headerAlign: 'center',
  399. align: 'right',
  400. columnLabel: '税率%',
  401. columnHidden: false,
  402. columnImage: false,
  403. columnSortable: false,
  404. sortLv: 0,
  405. status: true,
  406. fixed: '',
  407. columnWidth: 120
  408. },{
  409. userId: this.$store.state.user.name,
  410. functionId: 102001,
  411. serialNumber: '102001Table10FinalTaxedPrice',
  412. tableId: '102001Table10',
  413. tableName: '报价详情信息表',
  414. columnProp: 'finalTaxedPrice',
  415. headerAlign: 'center',
  416. align: 'right',
  417. columnLabel: '含税单价',
  418. columnHidden: false,
  419. columnImage: false,
  420. columnSortable: false,
  421. sortLv: 0,
  422. status: true,
  423. fixed: '',
  424. columnWidth: 120
  425. },{
  426. userId: this.$store.state.user.name,
  427. functionId: 102001,
  428. serialNumber: '102001Table10SystemComputePrice',
  429. tableId: '102001Table10',
  430. tableName: '报价详情信息表',
  431. columnProp: 'systemComputePrice',
  432. headerAlign: 'center',
  433. align: 'right',
  434. columnLabel: '含税总价',
  435. columnHidden: false,
  436. columnImage: false,
  437. columnSortable: false,
  438. sortLv: 0,
  439. status: true,
  440. fixed: '',
  441. columnWidth: 120
  442. },{
  443. userId: this.$store.state.user.name,
  444. functionId: 102001,
  445. serialNumber: '102001Table10QuotationDetailStatus',
  446. tableId: '102001Table10',
  447. tableName: '报价详情信息表',
  448. columnProp: 'quotationDetailStatus',
  449. headerAlign: 'center',
  450. align: 'center',
  451. columnLabel: '状态',
  452. columnHidden: false,
  453. columnImage: false,
  454. columnSortable: false,
  455. sortLv: 0,
  456. status: true,
  457. fixed: '',
  458. columnWidth: 120
  459. },{
  460. userId: this.$store.state.user.name,
  461. functionId: 102001,
  462. serialNumber: '102001Table10Remark',
  463. tableId: '102001Table10',
  464. tableName: '报价详情信息表',
  465. columnProp: 'remark',
  466. headerAlign: 'center',
  467. align: 'left',
  468. columnLabel: '备注',
  469. columnHidden: false,
  470. columnImage: false,
  471. columnSortable: false,
  472. sortLv: 0,
  473. status: true,
  474. fixed: '',
  475. columnWidth: 120
  476. },{
  477. userId: this.$store.state.user.name,
  478. functionId: 102001,
  479. serialNumber: '102001Table10InternalInquiryNo',
  480. tableId: '102001Table10',
  481. tableName: '报价详情信息表',
  482. columnProp: 'internalInquiryNo',
  483. headerAlign: 'center',
  484. align: 'left',
  485. columnLabel: '询价单号',
  486. columnHidden: false,
  487. columnImage: false,
  488. columnSortable: false,
  489. sortLv: 0,
  490. status: true,
  491. fixed: '',
  492. columnWidth: 120
  493. },
  494. ],
  495. };
  496. },
  497. methods:{
  498. handleQuery(){
  499. let params = {
  500. internalInquiryNo: this.inquiryNo,
  501. site: this.site
  502. }
  503. this.queryLoading = true;
  504. queryQuoteByInquiryNo(params).then(({data})=>{
  505. if (data && data.code === 0){
  506. this.dataList = data.rows;
  507. }else {
  508. this.$message.warning(data.msg);
  509. }
  510. this.queryLoading = false;
  511. }).catch((error)=>{
  512. this.$message.error(error)
  513. this.queryLoading = false;
  514. })
  515. },
  516. handleClickDetail(row){
  517. if (this.$router.resolve('quotation-sellForQuotation').resolved.name === '404') {
  518. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  519. } else {
  520. this.$router.push({
  521. name: 'quotation-sellForQuotation',
  522. params:{
  523. quotationHeaderId:row.quotationHeaderId,
  524. from:'inquiry'
  525. }
  526. })
  527. }
  528. }
  529. },
  530. watch:{
  531. inquiryNo(newVal, oldVal){
  532. this.handleQuery();
  533. },
  534. site(newVal, oldVal){
  535. this.handleQuery();
  536. }
  537. }
  538. }
  539. </script>
  540. <template>
  541. <el-table :height="height" :data="dataList" border v-loading="queryLoading" style="margin-top: 5px">
  542. <el-table-column label="操作" min-width="80px" fixed="left" align="center">
  543. <template slot-scope="scope">
  544. <a @click="handleClickDetail(scope.row)">详情</a>
  545. </template>
  546. </el-table-column>
  547. <el-table-column
  548. v-for="(item,index) in columns" :key="index"
  549. :sortable="item.columnSortable"
  550. :prop="item.columnProp"
  551. :header-align="item.headerAlign"
  552. :show-overflow-tooltip="item.showOverflowTooltip"
  553. :align="item.align"
  554. :fixed="item.fixed===''?false:item.fixed"
  555. :min-width="item.columnWidth"
  556. :label="item.columnLabel">
  557. <template slot-scope="scope" >
  558. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp]}}</span>
  559. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  560. </template>
  561. </el-table-column>
  562. </el-table>
  563. </template>
  564. <style scoped>
  565. </style>