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.

863 lines
30 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <script>
  2. import {getSiteAndBuByUserName} from "../../../api/qc/qc";
  3. import {queryQuoteDetailById, queryQuoteDetailReport, updateQuoteDetail} from "../../../api/quote/quoteDetail";
  4. import {getItemListByInquiryPartAndCodeNo} from "../../../api/inquiry/inquiryDetail";
  5. import BreakdownCost from "./detail/breakdownCost.vue";
  6. import BuSelect from "../../../components/selector/select/BuSelect.vue";
  7. import {queryPropertyTemplate} from "../../../api/property/template";
  8. import {queryPropertyTemplateDetailAvailableList} from "../../../api/property/templateDetail";
  9. import {againQuote} from "../../../api/quote/quote";
  10. import QuoteDetailTool from "./detail/primary/quoteDetailTool.vue";
  11. import QuoteDetailBom from "./detail/primary/quoteDetailBom.vue";
  12. import QuoteDetailOther from "./detail/primary/quoteDetailOther.vue";
  13. import QuoteDetailCost from "./detail/primary/quoteDetailCost.vue";
  14. import QuoteDetailRouting from "./detail/primary/quoteDetailRouting.vue";
  15. import TpCost from "./detail/tpCost.vue";
  16. export default {
  17. name: "quoteDetailReport",
  18. components: {
  19. TpCost,
  20. QuoteDetailRouting,
  21. QuoteDetailCost,
  22. QuoteDetailOther,
  23. QuoteDetailBom,
  24. QuoteDetailTool,
  25. BuSelect,
  26. BreakdownCost
  27. },
  28. props: {
  29. height: {
  30. type: [String, Number],
  31. default: "38vh"
  32. }
  33. },
  34. data() {
  35. return {
  36. queryForm: {
  37. buId: '',
  38. customerNo: '',
  39. customerDesc: '',
  40. partNo: '',
  41. partDesc: ''
  42. },
  43. no: 1,
  44. size: 20,
  45. total: 0,
  46. dataList: [],
  47. queryLoading: false,
  48. userBuList: [],
  49. columns: [
  50. {
  51. userId: this.$store.state.user.name,
  52. functionId: 5013,
  53. serialNumber: '5011Table1BuDesc',
  54. tableId: '5013Table1',
  55. tableName: '报价信息表',
  56. columnProp: 'buDesc',
  57. headerAlign: 'center',
  58. align: 'center',
  59. columnLabel: 'BU',
  60. columnHidden: false,
  61. columnImage: false,
  62. columnSortable: false,
  63. sortLv: 0,
  64. status: true,
  65. fixed: '',
  66. columnWidth: 80
  67. },
  68. {
  69. userId: this.$store.state.user.name,
  70. functionId: 5013,
  71. serialNumber: '5011Table1QuoteVersionNo',
  72. tableId: '5013Table1',
  73. tableName: '报价信息表',
  74. columnProp: 'quoteVersionNo',
  75. headerAlign: 'center',
  76. align: 'left',
  77. columnLabel: '报价单',
  78. columnHidden: false,
  79. columnImage: false,
  80. columnSortable: false,
  81. sortLv: 0,
  82. status: true,
  83. fixed: '',
  84. columnWidth: 140
  85. },
  86. {
  87. userId: this.$store.state.user.name,
  88. functionId: 5013,
  89. serialNumber: '5011Table1CustomerNo',
  90. tableId: '5013Table1',
  91. tableName: '报价信息表',
  92. columnProp: 'customerNo',
  93. headerAlign: 'center',
  94. align: 'left',
  95. columnLabel: '客户编码',
  96. columnHidden: false,
  97. columnImage: false,
  98. columnSortable: false,
  99. sortLv: 0,
  100. status: true,
  101. fixed: '',
  102. columnWidth: 80
  103. },
  104. {
  105. userId: this.$store.state.user.name,
  106. functionId: 5013,
  107. serialNumber: '5011Table1CustomerDesc',
  108. tableId: '5013Table1',
  109. tableName: '报价信息表',
  110. columnProp: 'customerDesc',
  111. headerAlign: 'center',
  112. align: 'left',
  113. columnLabel: '客户名称',
  114. columnHidden: false,
  115. columnImage: false,
  116. columnSortable: false,
  117. sortLv: 0,
  118. status: true,
  119. fixed: '',
  120. columnWidth: 140
  121. },
  122. {
  123. userId: this.$store.state.user.name,
  124. functionId: 5013,
  125. serialNumber: '5011Table1QuoteDate',
  126. tableId: '5013Table1',
  127. tableName: '报价信息表',
  128. columnProp: 'quoteDate',
  129. headerAlign: 'center',
  130. align: 'center',
  131. columnLabel: '报价日期',
  132. columnHidden: false,
  133. columnImage: false,
  134. columnSortable: false,
  135. sortLv: 0,
  136. status: true,
  137. fixed: '',
  138. columnWidth: 120
  139. }, {
  140. userId: this.$store.state.user.name,
  141. functionId: 5013,
  142. serialNumber: '5011Table1CustomerInquiryNo',
  143. tableId: '5013Table1',
  144. tableName: '报价信息表',
  145. columnProp: 'customerInquiryNo',
  146. headerAlign: 'center',
  147. align: 'left',
  148. columnLabel: '客户询价单号',
  149. columnHidden: false,
  150. columnImage: false,
  151. columnSortable: false,
  152. sortLv: 0,
  153. status: true,
  154. fixed: '',
  155. columnWidth: 100
  156. },
  157. {
  158. userId: this.$store.state.user.name,
  159. functionId: 5013,
  160. serialNumber: '5011Table1PartNo',
  161. tableId: '5013Table1',
  162. tableName: '报价信息表',
  163. columnProp: 'partNo',
  164. headerAlign: 'center',
  165. align: 'left',
  166. columnLabel: '物料编码',
  167. columnHidden: false,
  168. columnImage: false,
  169. columnSortable: false,
  170. sortLv: 0,
  171. status: true,
  172. fixed: '',
  173. columnWidth: 100
  174. },
  175. {
  176. userId: this.$store.state.user.name,
  177. functionId: 5013,
  178. serialNumber: '5011Table1PartDesc',
  179. tableId: '5013Table1',
  180. tableName: '报价信息表',
  181. columnProp: 'partDesc',
  182. headerAlign: 'center',
  183. align: 'left',
  184. columnLabel: '物料描述',
  185. columnHidden: false,
  186. columnImage: false,
  187. columnSortable: false,
  188. sortLv: 0,
  189. status: true,
  190. fixed: '',
  191. columnWidth: 140
  192. },
  193. {
  194. userId: this.$store.state.user.name,
  195. functionId: 5013,
  196. serialNumber: '5011Table1Status',
  197. tableId: '5013Table1',
  198. tableName: '报价信息表',
  199. columnProp: 'status',
  200. headerAlign: 'center',
  201. align: 'center',
  202. columnLabel: '状态',
  203. columnHidden: false,
  204. columnImage: false,
  205. columnSortable: false,
  206. sortLv: 0,
  207. status: true,
  208. fixed: '',
  209. columnWidth: 80
  210. },
  211. {
  212. userId: this.$store.state.user.name,
  213. functionId: 5013,
  214. serialNumber: '5011Table1CreateDate',
  215. tableId: '5013Table1',
  216. tableName: '报价信息表',
  217. columnProp: 'createDate',
  218. headerAlign: 'center',
  219. align: 'center',
  220. columnLabel: '创建日期',
  221. columnHidden: false,
  222. columnImage: false,
  223. columnSortable: false,
  224. sortLv: 0,
  225. status: true,
  226. fixed: '',
  227. columnWidth: 130
  228. },
  229. {
  230. userId: this.$store.state.user.name,
  231. functionId: 5013,
  232. serialNumber: '5011Table1CreateBy',
  233. tableId: '5013Table1',
  234. tableName: '报价信息表',
  235. columnProp: 'createBy',
  236. headerAlign: 'center',
  237. align: 'left',
  238. columnLabel: '创建人',
  239. columnHidden: false,
  240. columnImage: false,
  241. columnSortable: false,
  242. sortLv: 0,
  243. status: true,
  244. fixed: '',
  245. columnWidth: 100
  246. },
  247. {
  248. userId: this.$store.state.user.name,
  249. functionId: 5013,
  250. serialNumber: '5011Table1Site',
  251. tableId: '5013Table1',
  252. tableName: '报价信息表',
  253. columnProp: 'site',
  254. headerAlign: 'center',
  255. align: 'left',
  256. columnLabel: '工厂编码',
  257. columnHidden: false,
  258. columnImage: false,
  259. columnSortable: false,
  260. sortLv: 0,
  261. status: true,
  262. fixed: '',
  263. columnWidth: 80
  264. },
  265. ],
  266. currentRow: {},
  267. activeName: 'detail',
  268. inquiryDataList: [],
  269. queryPropertyLoading: false,
  270. propertyVisible: false,
  271. propertyList: [],
  272. currentProperty: {
  273. id: undefined,
  274. codeNo: '',
  275. codeDesc: '',
  276. },
  277. propertyItemList: [],
  278. saveQuoteDetailRules: {
  279. partNo: [{required: true, message: '请输入物料编码', trigger: ['blur', 'change']}],
  280. partDesc: [{required: true, message: '请输入物料名称', trigger: ['blur', 'change']}],
  281. qty: [{required: true, message: '请输入数量', trigger: ['blur', 'change']}],
  282. },
  283. quoteDetail: {},
  284. quoteDetailVisible: false,
  285. quoteDetailActiveName: 'bom',
  286. saveLoading: false,
  287. }
  288. },
  289. methods: {
  290. getSiteAndBuByUserName() {
  291. let tempData = {
  292. username: this.$store.state.user.name,
  293. }
  294. getSiteAndBuByUserName(tempData).then(({data}) => {
  295. if (data.code === 0) {
  296. this.userBuList = data.rows
  297. }
  298. })
  299. },
  300. handleQuery() {
  301. let list = [];
  302. if (this.propertyItemList.length > 0) {
  303. list = this.propertyItemList.filter(item => item.textValue || item.numValue);
  304. }
  305. let params = {
  306. ...this.queryForm,
  307. no: this.no,
  308. size: this.size,
  309. codeId: this.currentProperty.id,
  310. list,
  311. }
  312. this.queryLoading = true
  313. queryQuoteDetailReport(params).then(({data}) => {
  314. if (data && data.code === 0) {
  315. this.dataList = data.rows
  316. this.total = data.total
  317. if (this.total === 0) {
  318. this.currentRow = {}
  319. } else if (this.currentRow.id !== undefined) {
  320. // this.currentRow = {}
  321. } else {
  322. this.currentRow = this.dataList[0]
  323. }
  324. } else {
  325. this.$message.warning(data.msg)
  326. }
  327. this.queryLoading = false
  328. }).catch((error) => {
  329. this.$message.error(error)
  330. this.queryLoading = false
  331. })
  332. },
  333. handleRowClick(row) {
  334. this.currentRow = {...row}
  335. },
  336. rowStyle({row}) {
  337. if (this.currentRow && this.currentRow.id === row.id) {
  338. return {'background-color': '#E8F7F6'};
  339. } else {
  340. return {}
  341. }
  342. },
  343. handleSizeChange(val) {
  344. this.size = val
  345. this.handleQuery()
  346. },
  347. handlePageChange(val) {
  348. this.no = val
  349. this.handleQuery()
  350. },
  351. handleQueryInquiryProperties() {
  352. if (this.currentRow.id === undefined) {
  353. this.inquiryDataList = []
  354. return
  355. }
  356. let params = {
  357. inquiryPartId: this.currentRow.rfqDetailId,
  358. buNo: this.currentRow.buNo,
  359. site: this.currentRow.site,
  360. recordType: 'PRICECHECK',
  361. }
  362. this.queryPropertyLoading = true
  363. getItemListByInquiryPartAndCodeNo(params).then(({data}) => {
  364. if (data && data.code === 0) {
  365. this.inquiryDataList = data.rows
  366. } else {
  367. this.$message.warning(data.msg)
  368. }
  369. this.queryPropertyLoading = false
  370. }).catch((error) => {
  371. this.$message.error(error)
  372. this.queryPropertyLoading = false
  373. })
  374. },
  375. handleClickProperty() {
  376. if (!this.queryForm.buId) {
  377. this.$message.warning('请先选择BU')
  378. return
  379. }
  380. // this.handleQueryProperty();
  381. this.propertyVisible = true;
  382. },
  383. handleQueryProperty() {
  384. let params = {
  385. buId: this.queryForm.buId,
  386. createBy: this.$store.state.user.name,
  387. functionType: 'IP'
  388. }
  389. queryPropertyTemplate(params).then(({data}) => {
  390. if (data && data.code === 0) {
  391. this.propertyList = data.rows
  392. if (this.propertyList.length > 0) {
  393. this.currentProperty.id = this.propertyList[0].id
  394. this.currentProperty.codeNo = this.propertyList[0].codeNo
  395. }
  396. } else {
  397. this.$message.warning(data.msg)
  398. }
  399. }).catch((error) => {
  400. this.$message.error(error)
  401. })
  402. },
  403. handleQueryPropertyTemplateDetailAvailableList() {
  404. let params = {
  405. headerId: this.currentProperty.id,
  406. }
  407. this.propertyItemList = []
  408. queryPropertyTemplateDetailAvailableList(params).then(({data}) => {
  409. if (data && data.code === 0) {
  410. this.propertyItemList = data.rows
  411. } else {
  412. this.$message.warning(data.msg)
  413. }
  414. }).catch((error) => {
  415. this.$message.error(error)
  416. })
  417. },
  418. handleAgainQuote(row) {
  419. this.quoteDetail = {};
  420. this.$confirm('确定重新报价该报价单吗?').then(() => {
  421. this.handleAgainQuoteOption(row);
  422. })
  423. },
  424. handleAgainQuoteOption(row) {
  425. let params = {
  426. id: row.quoteId,
  427. createBy: this.$store.state.user.name,
  428. }
  429. this.queryLoading = true
  430. againQuote(params).then(({data}) => {
  431. if (data && data.code === 0) {
  432. this.$message.success(data.msg)
  433. this.handleQuery();
  434. let params = {
  435. id: data.id,
  436. }
  437. this.handleQueryQuoteDetailById(params);
  438. } else {
  439. this.$message.warning(data.msg)
  440. this.queryLoading = false
  441. }
  442. }).catch((error) => {
  443. this.$message.error(error)
  444. this.queryLoading = false
  445. })
  446. },
  447. handleQueryQuoteDetailById(row) {
  448. let params = {
  449. id: row.id,
  450. }
  451. queryQuoteDetailById(params).then(({data}) => {
  452. if (data && data.code === 0) {
  453. this.quoteDetail = data.row;
  454. this.quoteDetailVisible = true;
  455. this.quoteDetailActiveName = 'bom';
  456. } else {
  457. this.$message.warning(data.msg)
  458. }
  459. }).catch((error) => {
  460. this.$message.error(error)
  461. })
  462. },
  463. handleClickTab(tab) {
  464. if (this.activeName === 'routing') {
  465. this.$refs.routing.handleQueryQuoteDetailBomTree()
  466. }
  467. },
  468. handleSaveQuoteDetailClick() {
  469. this.$refs.saveQuoteDetailForm.validate((valid, obj) => {
  470. if (valid) {
  471. this.handleUpdate();
  472. }
  473. })
  474. },
  475. handleUpdate() {
  476. let params = {
  477. ...this.quoteDetail,
  478. updateBy: this.$store.state.user.name,
  479. }
  480. updateQuoteDetail(params).then(({data}) => {
  481. if (data && data.code === 0) {
  482. this.$message.success(data.msg);
  483. this.quoteDetailVisible = false;
  484. } else {
  485. this.$message.warning(data.msg);
  486. }
  487. }).catch((error) => {
  488. this.$message.error(error);
  489. })
  490. },
  491. },
  492. created() {
  493. this.getSiteAndBuByUserName();
  494. this.handleQuery();
  495. },
  496. watch: {
  497. currentRow(newVal, oldVal) {
  498. if (newVal) {
  499. this.handleQueryInquiryProperties()
  500. }
  501. },
  502. 'queryForm.buId'(newVal, oldVal) {
  503. this.currentProperty.id = undefined
  504. this.currentProperty.codeNo = ''
  505. this.propertyItemList = []
  506. if (newVal) {
  507. this.handleQueryProperty();
  508. }
  509. },
  510. 'currentProperty.id'(newVal, oldVal) {
  511. if (newVal) {
  512. this.handleQueryPropertyTemplateDetailAvailableList();
  513. }
  514. }
  515. }
  516. }
  517. </script>
  518. <template>
  519. <div>
  520. <div style="width: 1200px">
  521. <el-form :model="queryForm" label-position="top">
  522. <el-row :gutter="10">
  523. <el-col :span="3">
  524. <el-form-item label="BU">
  525. <bu-select v-model="queryForm.buId">
  526. <el-option label="全部" value=""></el-option>
  527. </bu-select>
  528. </el-form-item>
  529. </el-col>
  530. <el-col :span="3">
  531. <el-form-item label="客户编码">
  532. <el-input v-model="queryForm.customerNo"></el-input>
  533. </el-form-item>
  534. </el-col>
  535. <el-col :span="3">
  536. <el-form-item label="客户名称">
  537. <el-input v-model="queryForm.customerDesc"></el-input>
  538. </el-form-item>
  539. </el-col>
  540. <el-col :span="3">
  541. <el-form-item label="产品编码">
  542. <el-input v-model="queryForm.partNo"></el-input>
  543. </el-form-item>
  544. </el-col>
  545. <el-col :span="3">
  546. <el-form-item label="产品描述">
  547. <el-input v-model="queryForm.partDesc"></el-input>
  548. </el-form-item>
  549. </el-col>
  550. <el-col :span="3">
  551. <el-form-item label="报价单号">
  552. <el-input v-model="queryForm.quoteVersionNo"></el-input>
  553. </el-form-item>
  554. </el-col>
  555. <el-col :span="3">
  556. <el-form-item label=" ">
  557. <el-button type="primary" @click="handleClickProperty">属性</el-button>
  558. <el-button type="primary" @click="handleQuery">查询</el-button>
  559. </el-form-item>
  560. </el-col>
  561. </el-row>
  562. </el-form>
  563. </div>
  564. <el-table v-loading="queryLoading" :data="dataList" border :height="height" :row-style="rowStyle"
  565. @row-click="handleRowClick">
  566. <el-table-column
  567. v-for="(item,index) in columns" :key="index"
  568. :sortable="item.columnSortable"
  569. :prop="item.columnProp"
  570. :header-align="item.headerAlign"
  571. :show-overflow-tooltip="item.showOverflowTooltip"
  572. :align="item.align"
  573. :fixed="item.fixed===''?false:item.fixed"
  574. :min-width="item.columnWidth"
  575. :label="item.columnLabel">
  576. <template slot-scope="scope">
  577. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  578. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  579. style="width: 100px; height: 80px"/></span>
  580. </template>
  581. </el-table-column>
  582. <el-table-column fixed="right"
  583. header-align="center"
  584. align="center"
  585. width="100"
  586. label="操作">
  587. <template slot-scope="{row,$index}">
  588. <el-link @click="handleAgainQuote(row)">重新报价</el-link>
  589. </template>
  590. </el-table-column>
  591. </el-table>
  592. <el-pagination @size-change="handleSizeChange"
  593. @current-change="handlePageChange"
  594. :current-page="no"
  595. :page-sizes="[20, 50, 100, 200, 500]"
  596. :page-size="size"
  597. :total="total"
  598. layout="total,sizes, prev, pager, next, jumper">
  599. </el-pagination>
  600. <el-tabs v-model="activeName">
  601. <el-tab-pane label="详情" name="detail">
  602. <el-form :model="currentRow" label-position="top" style="width: 1000px">
  603. <el-row :gutter="10">
  604. <el-col :span="4">
  605. <el-form-item label="报价单号">
  606. <el-input v-model="currentRow.quoteVersionNo" readonly></el-input>
  607. </el-form-item>
  608. </el-col>
  609. <el-col :span="4">
  610. <el-form-item label="BU">
  611. <el-input v-model="currentRow.buDesc" readonly></el-input>
  612. </el-form-item>
  613. </el-col>
  614. <el-col :span="4">
  615. <el-form-item label="工厂编码">
  616. <el-input v-model="currentRow.site" readonly></el-input>
  617. </el-form-item>
  618. </el-col>
  619. </el-row>
  620. <el-row :gutter="10">
  621. <el-col :span="4">
  622. <el-form-item label="客户编码">
  623. <el-input v-model="currentRow.customerNo" readonly></el-input>
  624. </el-form-item>
  625. </el-col>
  626. <el-col :span="6">
  627. <el-form-item label="客户名称">
  628. <el-input v-model="currentRow.customerDesc" readonly></el-input>
  629. </el-form-item>
  630. </el-col>
  631. <el-col :span="4">
  632. <el-form-item label="状态">
  633. <el-input v-model="currentRow.status" readonly></el-input>
  634. </el-form-item>
  635. </el-col>
  636. <el-col :span="20">
  637. <el-form-item label="报价备注" class="auto" :show-message="false">
  638. <el-input type="textarea" v-model="currentRow.quoteRemark" resize="none" readonly></el-input>
  639. </el-form-item>
  640. </el-col>
  641. <el-col :span="20">
  642. <el-form-item label="报价详情备注" class="auto" :show-message="false">
  643. <el-input type="textarea" v-model="currentRow.remark" resize="none" readonly></el-input>
  644. </el-form-item>
  645. </el-col>
  646. </el-row>
  647. <el-row :gutter="10">
  648. <el-col :span="4">
  649. <el-form-item label="创建人">
  650. <el-input v-model="currentRow.createBy" readonly></el-input>
  651. </el-form-item>
  652. </el-col>
  653. <el-col :span="6">
  654. <el-form-item label="创建日期">
  655. <el-input v-model="currentRow.createDate" readonly></el-input>
  656. </el-form-item>
  657. </el-col>
  658. <el-col :span="4">
  659. <el-form-item label="最近更新人">
  660. <el-input v-model="currentRow.updateBy" readonly></el-input>
  661. </el-form-item>
  662. </el-col>
  663. <el-col :span="6">
  664. <el-form-item label="最近更新日期">
  665. <el-input v-model="currentRow.updateDate" readonly></el-input>
  666. </el-form-item>
  667. </el-col>
  668. </el-row>
  669. </el-form>
  670. </el-tab-pane>
  671. <el-tab-pane name="inquiry" label="询价单信息">
  672. <el-form :model="currentRow" label-position="top" style="width: 1000px">
  673. <el-row :gutter="10">
  674. <el-col :span="5">
  675. <el-form-item label="询价单号">
  676. <el-input v-model="currentRow.internalInquiryNo" readonly></el-input>
  677. </el-form-item>
  678. </el-col>
  679. <el-col :span="5">
  680. <el-form-item label="询价日期">
  681. <el-input v-model="currentRow.requestDate" readonly></el-input>
  682. </el-form-item>
  683. </el-col>
  684. <el-col :span="5">
  685. <el-form-item label="PJM">
  686. <el-input v-model="currentRow.requesterName" readonly></el-input>
  687. </el-form-item>
  688. </el-col>
  689. </el-row>
  690. <el-row :gutter="10">
  691. <el-col :span="5">
  692. <el-form-item label="客户询价单号">
  693. <el-input v-model="currentRow.customerInquiryNo" readonly></el-input>
  694. </el-form-item>
  695. </el-col>
  696. <el-col :span="5">
  697. <el-form-item label="要求报价日期">
  698. <el-input v-model="currentRow.requiredCompletionDate" readonly></el-input>
  699. </el-form-item>
  700. </el-col>
  701. <el-col :span="5">
  702. <el-form-item label="优先等级">
  703. <el-input v-model="currentRow.priorityLevel" readonly></el-input>
  704. </el-form-item>
  705. </el-col>
  706. <el-col :span="5">
  707. <el-form-item label="状态">
  708. <el-input v-model="currentRow.rfqStatus" readonly></el-input>
  709. </el-form-item>
  710. </el-col>
  711. <el-col :span="20">
  712. <el-form-item label="备注" class="auto" :show-message="false">
  713. <el-input type="textarea" v-model="currentRow.rfqRemark" resize="none" readonly></el-input>
  714. </el-form-item>
  715. </el-col>
  716. </el-row>
  717. </el-form>
  718. <el-table :data="inquiryDataList" v-loading="queryPropertyLoading" height="19vh"
  719. style="margin-top: 10px;width: 1000px" border>
  720. <el-table-column label="属性编码" header-align="center" min-width="100" prop="itemNo"></el-table-column>
  721. <el-table-column label="属性名称" header-align="center" min-width="160" prop="itemDesc"></el-table-column>
  722. <el-table-column label="属性类型" header-align="center" min-width="80" prop="valueType"></el-table-column>
  723. <el-table-column label="属性值" header-align="center" min-width="100">
  724. <template slot-scope="scope">
  725. <span v-if="scope.row.valueType === '文本'">{{ scope.row.textValue }}</span>
  726. <span v-if="scope.row.valueType === '数字'">{{ scope.row.numValue }}</span>
  727. </template>
  728. </el-table-column>
  729. </el-table>
  730. </el-tab-pane>
  731. <el-tab-pane name="breakdown" label="Cost Breakdown">
  732. <breakdown-cost :quote-detail="currentRow" height="36vh"></breakdown-cost>
  733. </el-tab-pane>
  734. <el-tab-pane name="tp" label="TP">
  735. <tp-cost :quote-detail="currentRow" height="36vh"></tp-cost>
  736. </el-tab-pane>
  737. </el-tabs>
  738. <el-dialog title="属性详情" v-drag :visible.sync="propertyVisible" :close-on-click-modal="false" append-to-body
  739. width="800px">
  740. <el-form :model="currentProperty" label-position="top">
  741. <el-row :gutter="10">
  742. <el-col :span="4">
  743. <el-form-item label="BU">
  744. <bu-select v-model="queryForm.buId" disabled></bu-select>
  745. </el-form-item>
  746. </el-col>
  747. <el-col :span="8">
  748. <el-form-item label="属性模板">
  749. <el-select v-model="currentProperty.id" style="width: 100%;">
  750. <el-option v-for="item in propertyList" :key="item.id" :label="item.codeDesc" :value="item.id">
  751. <div style="float:left;">{{ item.codeDesc }}</div>
  752. <div style="float:right;">{{ item.codeNo }}</div>
  753. </el-option>
  754. </el-select>
  755. </el-form-item>
  756. </el-col>
  757. </el-row>
  758. </el-form>
  759. <el-table :data="propertyItemList" border height="300px">
  760. <el-table-column label="属性编码" header-align="center" min-width="120" prop="itemNo"></el-table-column>
  761. <el-table-column label="属性名称" header-align="center" min-width="180" prop="itemDesc"></el-table-column>
  762. <el-table-column label="属性类型" header-align="center" align="center" min-width="80" prop="valueType"></el-table-column>
  763. <el-table-column label="属性值" header-align="center" min-width="140" prop="value">
  764. <template slot-scope="scope">
  765. <template v-if="scope.row.valueTypeDb==='T' && scope.row.valueChooseFlag==='Y'">
  766. <el-select v-model="scope.row['textValue']" placeholder="请选择" style="width: 100%" clearable>
  767. <el-option :label="available.availableValue" :value="available.availableValue" :key="available.id"
  768. v-for="(available) in scope.row.availableList"></el-option>
  769. </el-select>
  770. </template>
  771. <template v-else-if="scope.row.valueTypeDb==='N' && scope.row.valueChooseFlag==='Y'">
  772. <el-select v-model="scope.row['numValue']" placeholder="请选择" style="width: 100%" clearable>
  773. <el-option :label="available.availableValue" :value="available.availableValue" :key="available.id"
  774. v-for="(available) in scope.row.availableList"></el-option>
  775. </el-select>
  776. </template>
  777. <template v-else-if="scope.row.valueTypeDb==='T'">
  778. <el-input v-model="scope.row['textValue']"></el-input>
  779. </template>
  780. <template v-else-if="scope.row.valueTypeDb==='N'">
  781. <el-input-number style="width: 100%" :controls="false" :step="0"
  782. v-model="scope.row['numValue']"></el-input-number>
  783. </template>
  784. </template>
  785. </el-table-column>
  786. </el-table>
  787. <div slot="footer" class="dialog-footer">
  788. <el-button type="primary" @click="propertyVisible = false"> </el-button>
  789. <el-button @click="propertyVisible = false"> </el-button>
  790. </div>
  791. </el-dialog>
  792. <el-dialog :title="`报价明细`" top="10vh" v-drag :visible.sync="quoteDetailVisible" append-to-body
  793. :width="`${quoteDetail.id?1200:600}px`" :close-on-click-modal="false">
  794. <el-form :model="quoteDetail" ref="saveQuoteDetailForm" :rules="saveQuoteDetailRules" label-position="top">
  795. <el-row :gutter="20">
  796. <el-col :span="4">
  797. <el-form-item label="物料名称" prop="partNo" :show-message="false">
  798. <el-input v-model="quoteDetail.partNo" disabled></el-input>
  799. </el-form-item>
  800. </el-col>
  801. <el-col :span="6">
  802. <el-form-item label="物料描述" prop="partDesc" :show-message="false">
  803. <el-input v-model="quoteDetail.partDesc" disabled></el-input>
  804. </el-form-item>
  805. </el-col>
  806. <el-col :span="3">
  807. <el-form-item label="报价数量" prop="qty" :show-message="false">
  808. <el-input-number v-model="quoteDetail.qty" style="width: 100%;" :controls="false" disabled></el-input-number>
  809. </el-form-item>
  810. </el-col>
  811. </el-row>
  812. <el-row :gutter="20">
  813. <el-col :span="16">
  814. <el-form-item label="备注" class="auto" :show-message="false">
  815. <el-input type="textarea" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="quoteDetail.remark" disabled></el-input>
  816. </el-form-item>
  817. </el-col>
  818. </el-row>
  819. </el-form>
  820. <el-tabs v-model="quoteDetailActiveName" @tab-click="handleClickTab">
  821. <el-tab-pane label="材料" name="bom">
  822. <quote-detail-bom v-if="quoteDetailVisible" v-model:quoteDetail="quoteDetail"></quote-detail-bom>
  823. </el-tab-pane>
  824. <el-tab-pane label="工艺" name="routing">
  825. <quote-detail-routing ref="routing" v-if="quoteDetailVisible"
  826. v-model:quoteDetail="quoteDetail"></quote-detail-routing>
  827. </el-tab-pane>
  828. <el-tab-pane label="工具" name="tool">
  829. <quote-detail-tool v-if="quoteDetailVisible" v-model:quoteDetail="quoteDetail"></quote-detail-tool>
  830. </el-tab-pane>
  831. <el-tab-pane label="其他成本" name="other">
  832. <quote-detail-other v-if="quoteDetailVisible" v-model:quoteDetail="quoteDetail"></quote-detail-other>
  833. </el-tab-pane>
  834. <el-tab-pane label="成本&价格" name="cost">
  835. <quote-detail-cost v-model:quoteDetail="quoteDetail"></quote-detail-cost>
  836. </el-tab-pane>
  837. </el-tabs>
  838. <div slot="footer" class="dialog-footer">
  839. <el-button type="primary" :loading="saveLoading" @click="handleSaveQuoteDetailClick"> </el-button>
  840. <el-button @click="quoteDetailVisible = false"> </el-button>
  841. </div>
  842. </el-dialog>
  843. </div>
  844. </template>
  845. <style scoped>
  846. .el-table /deep/ .cell {
  847. height: auto;
  848. line-height: 1.5;
  849. }
  850. .auto /deep/ .el-form-item__content {
  851. height: auto;
  852. line-height: 1.5;
  853. }
  854. </style>