From 59cdda80ce2e5e05f0a9b345a6d9e2d7f57fde1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=A5=89=E6=BA=90?= <1976974459@qq.com> Date: Tue, 19 Sep 2023 17:47:02 +0800 Subject: [PATCH] =?UTF-8?q?2023-09-19=20plm=E6=8A=A5=E4=BB=B7=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/quotation/quotationInformation.js | 19 +- .../customerInformationManagement.vue | 22 +- .../quotation/quotation_upload_file.vue | 121 +++++ .../modules/quotation/requestForQuote.vue | 430 ++++++++++++++++-- 4 files changed, 547 insertions(+), 45 deletions(-) create mode 100644 src/views/modules/quotation/quotation_upload_file.vue diff --git a/src/api/quotation/quotationInformation.js b/src/api/quotation/quotationInformation.js index 61b5cb1..c709b8d 100644 --- a/src/api/quotation/quotationInformation.js +++ b/src/api/quotation/quotationInformation.js @@ -24,4 +24,21 @@ export const quotationInformationEdit = data => createAPI(`/plm/quotationInforma * @returns {*} */ export const quotationInformationDelete = data => createAPI(`/plm/quotationInformation/quotationInformationDelete`,'post',data) - +/** + * 获取报价单附件列表 + * @param data + * @returns {*} + */ +export const getFileContentList = data => createAPI(`/plm/quotationInformation/getFileContentList`,'post',data) +/** + * 获取报价结果对象 + * @param data + * @returns {*} + */ +export const quotationResultSearch = data => createAPI(`/plm/quotationInformation/quotationResultSearch`,'post',data) +/** + * 文件上传 + * @param data + * @returns {*} + */ +export const uploadFile = data => createAPI(`/plm/quotationInformation/uploadFile`,'post',data) diff --git a/src/views/modules/customer/customerInformationManagement.vue b/src/views/modules/customer/customerInformationManagement.vue index 675f86b..4d8386f 100644 --- a/src/views/modules/customer/customerInformationManagement.vue +++ b/src/views/modules/customer/customerInformationManagement.vue @@ -102,11 +102,6 @@ - - - - - @@ -169,7 +164,22 @@ - + + + + + + + 保存 关闭 diff --git a/src/views/modules/quotation/quotation_upload_file.vue b/src/views/modules/quotation/quotation_upload_file.vue new file mode 100644 index 0000000..f21093d --- /dev/null +++ b/src/views/modules/quotation/quotation_upload_file.vue @@ -0,0 +1,121 @@ + + + + diff --git a/src/views/modules/quotation/requestForQuote.vue b/src/views/modules/quotation/requestForQuote.vue index 57bbbba..50844e4 100644 --- a/src/views/modules/quotation/requestForQuote.vue +++ b/src/views/modules/quotation/requestForQuote.vue @@ -139,8 +139,13 @@ layout="total, sizes, prev, pager, next, jumper"> - + + + + + + 客户 @@ -192,49 +197,52 @@ - + + - + 保存 关闭 - - - - - - - - 新增 - 删除 - + + + + + + + + + + + + + + + 上传文件 + style="width: 100%"> - - @@ -266,25 +396,31 @@ quotationInformationSearch, // 报价信息列表查询 quotationInformationSave, // 报价信息新增 quotationInformationEdit, // 报价信息编辑 - quotationInformationDelete // 报价信息删除 + quotationInformationDelete, // 报价信息删除 + getFileContentList, // 获取报价单附件列表 + quotationResultSearch, // 获取报价结果对象 } from '@/api/quotation/quotationInformation.js' - import Chooselist from '@/views/modules/common/Chooselist' + import quotationUploadFile from "./quotation_upload_file"; export default { components: { - Chooselist + Chooselist, + quotationUploadFile }, watch: { searchData: { deep: true, handler: function (newV, oldV) { this.searchData.customerNo = this.searchData.customerNo.toUpperCase() + this.searchData.projectId = this.searchData.projectId.toUpperCase() } }, modalData: { deep: true, handler: function (newV, oldV) { this.modalData.customerNo = this.modalData.customerNo.toUpperCase() + this.modalData.projectId = this.modalData.projectId.toUpperCase() + this.modalData.quotationNo = this.modalData.quotationNo.toUpperCase() } } }, @@ -324,7 +460,7 @@ // 其它 dataListLoading: false, // 初始页签 - activeTable: 'customer_contact', + activeTable: 'quotation_detail_information', // ======== 数据对象 ======== modalData: { flag: '', @@ -363,8 +499,33 @@ updateDate: '', updateBy: '' }, + quotationDetailData: { + technicalConsiderations: '', + customerResponsiblePerson: '', + customerResponsiblePersonPhone: '' + }, + quotationResultData: { + actualityQuotationDate: '', + quotationResultInformation: '', + actualitySubmissionDate: '', + submissionMethod: '', + submissionRemark: '', + confirmResults: '', + actualityReplyDate: '', + confirmBy: '', + confirmInformation: '' + }, + enterResultData: { + site: this.$store.state.user.site, + quotationNo: '', + actualityQuotationDate: '', + quotationResultInformation: '', + fileContentList: [], + updateBy: this.$store.state.user.name, + }, // ======== 数据列表 ======== dataList: [], + fileContentList: [], // ======== 列表表头 ======== columnList: [ { @@ -638,6 +799,98 @@ columnWidth: 80 } ], + fileColumnList: [ + { + userId: this.$store.state.user.name, + functionId: 102001, + serialNumber: '102001Table2FileName', + tableId: '102001Table2', + tableName: '文件信息表', + columnProp: 'fileName', + headerAlign: 'center', + align: 'center', + columnLabel: '文件名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, + { + userId: this.$store.state.user.name, + functionId: 102001, + serialNumber: '102001Table2OrderRef3', + tableId: '102001Table2', + tableName: '文件信息表', + columnProp: 'orderRef3', + headerAlign: 'center', + align: 'center', + columnLabel: '文件描述', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, + { + userId: this.$store.state.user.name, + functionId: 102001, + serialNumber: '102001Table2CreateDate', + tableId: '102001Table2', + tableName: '文件信息表', + columnProp: 'createDate', + headerAlign: 'center', + align: 'center', + columnLabel: '上传时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, + { + userId: this.$store.state.user.name, + functionId: 102001, + serialNumber: '102001Table2CreatedBy', + tableId: '102001Table2', + tableName: '文件信息表', + columnProp: 'createdBy', + headerAlign: 'center', + align: 'center', + columnLabel: '上传人', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, + { + userId: this.$store.state.user.name, + functionId: 102001, + serialNumber: '102001Table2FileRemark', + tableId: '102001Table2', + tableName: '文件信息表', + columnProp: 'fileRemark', + headerAlign: 'center', + align: 'center', + columnLabel: '备注', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 180 + } + ], // ======== 必填规则 ======== rules: { customerDesc: [ @@ -690,6 +943,22 @@ } ] }, + enterResultRules: { + actualityQuotationDate: [ + { + required: true, + message: ' ', + trigger: 'change' + } + ], + quotationResultInformation: [ + { + required: true, + message: ' ', + trigger: 'change' + } + ] + }, // ======== 复选数据集 ======== quotationSelections: [], // ======== 选中的当前行数据 ======== @@ -697,6 +966,7 @@ // ======== 模态框开关控制 ======== modalFlag: false, modalDisableFlag: false, + quotationResultModalFlag: false } }, mounted () { @@ -761,8 +1031,8 @@ * 刷新页签的table数据 */ refreshCurrentTabTable () { - if (this.activeTable === 'customer_contact') { - this.getCustomerContactList(); + if (this.activeTable === 'quotation_result') { + this.getQuotationResult() } }, @@ -782,13 +1052,33 @@ //判断是否全部存在数据 if(this.totalPage > 0){ //设置选中行 - this.$refs.quotationTable.setCurrentRow(this.dataList[0]); - this.refreshCurrentTabTable();//加载当前的页签的table + this.$refs.quotationTable.setCurrentRow(this.dataList[0]) + this.refreshCurrentTabTable() //加载当前的页签的table + this.quotationClickRow(this.dataList[0]) } } this.dataListLoading = false }) }, + /** + * 获取报价结果列表 + */ + getQuotationResult () { + let tempData = { + site: this.$store.state.user.site, + quotationNo: this.quotationCurrentRow.quotationNo + } + // 报价结果对象 + quotationResultSearch(tempData).then(({data}) => { + if (data && data.code === 0) { + this.quotationResultData = data.rows[0]; + } else { + this.quotationResultData = {}; + } + }) + // 附件列表 + this.getFileContentData() + }, // ======== 新增模态框 ======== /** @@ -1014,6 +1304,7 @@ */ quotationClickRow (row) { this.quotationCurrentRow = JSON.parse(JSON.stringify(row)); + this.quotationDetailData = row; }, // ======== 列表复选方法 ======== @@ -1025,6 +1316,69 @@ this.quotationSelections = val }, + // ======== 报价结果相关方法 ======== + /** + * 录入报价结果 + */ + quotationResultModal () { + this.enterResultData = { + site: this.$store.state.user.site, + quotationNo: this.quotationCurrentRow.quotationNo, + actualityQuotationDate: '', + quotationResultInformation: '', + fileContentList: [], + updateBy: this.$store.state.user.name, + } + this.quotationResultModalFlag = true + }, + /** + * 提交客户报价 + */ + submitQuotationModal () { + + }, + /** + * 客户回复 + */ + customerResponseModal () { + + }, + + // ======== 报价单附件的相关方法 ======== + /** + * 获取报价单附件列表 + */ + getFileContentData () { + let currentData = { + orderRef1: this.$store.state.user.site, + orderRef2: this.quotationCurrentRow.quotationNo + } + getFileContentList(currentData).then(({data}) => { + if (data && data.code === 0) { + this.fileContentList = data.rows; + } else { + this.fileContentList = []; + } + }) + }, + /** + * 上传文件 + */ + uploadFile () { + let currentData = { + titleCon: '报价附件上传', + site: this.$store.state.user.site, + createBy: this.$store.state.user.name, + quotationNo: this.enterResultData.quotationNo, + fileRemark: '', + folder: 'quotationFile', + }; + //打开组件 去做新增业务 + this.$nextTick(() => { + this.$refs.quotationUploadFile.init(currentData); + }) + }, + // ======== chooseList相关方法 ======== /** * 获取基础数据列表S