diff --git a/src/api/oss/oss.js b/src/api/oss/oss.js index 96f00e3..0b9c3ff 100644 --- a/src/api/oss/oss.js +++ b/src/api/oss/oss.js @@ -8,3 +8,12 @@ export const updateOssRef = data => createAPI(`/sys/oss/updateOssRef`,'post',dat * @returns {*} */ export const uploadFile = data => createAPI(`/base/uploadFile`,'post',data) + + +export const ossUpload = (data) => createAPI(`/oss/upload`,'post',data) + +export const queryOss = (data) => createAPI(`/oss`,'post',data) + +export const removeOss = (data) => createAPI(`/oss/remove`,'post',data) + +export const previewOssFileById = (data) => createAPI(`/oss/${data.id}`,'post','download') diff --git a/src/views/modules/oss/ossComponents.vue b/src/views/modules/oss/ossComponents.vue new file mode 100644 index 0000000..3239766 --- /dev/null +++ b/src/views/modules/oss/ossComponents.vue @@ -0,0 +1,302 @@ + + + + + diff --git a/src/views/modules/project/projectInfo/projectInfo.vue b/src/views/modules/project/projectInfo/projectInfo.vue index 97046ef..96bfddf 100644 --- a/src/views/modules/project/projectInfo/projectInfo.vue +++ b/src/views/modules/project/projectInfo/projectInfo.vue @@ -300,48 +300,49 @@ - + + - - - 上传文件 - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -549,9 +550,11 @@ import quotationHeader from "./com_project_info_quotation.vue"; import DictDataSelect from "../../sys/dict-data-select.vue"; import ChangeRecord from "./com_project_change_record.vue"; + import OssComponents from "../../oss/ossComponents.vue"; /*組件*/ export default { components: { + OssComponents, ChangeRecord, DictDataSelect, Chooselist, @@ -1332,7 +1335,99 @@ fixed: '', columnWidth: 100 } - ] + ], + ossColumns:[ + { + userId: this.$store.state.user.name, + functionId: 103001, + serialNumber: '103001Table2FileName', + tableId: '103001Table2', + tableName: '文件信息表', + columnProp: 'fileName', + headerAlign: 'center', + align: 'center', + columnLabel: '文件名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 140 + }, + { + userId: this.$store.state.user.name, + functionId: 103001, + serialNumber: '103001Table2FileRemark', + tableId: '103001Table2', + tableName: '文件信息表', + columnProp: 'fileRemark', + headerAlign: 'center', + align: 'center', + columnLabel: '备注', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 240 + }, + // { + // userId: this.$store.state.user.name, + // functionId: 103001, + // serialNumber: '103001Table2OrderRef3', + // tableId: '103001Table2', + // 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: 103001, + serialNumber: '103001Table2CreateDate', + tableId: '103001Table2', + tableName: '文件信息表', + columnProp: 'createDate', + headerAlign: 'center', + align: 'center', + columnLabel: '上传时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 140 + }, + { + userId: this.$store.state.user.name, + functionId: 103001, + serialNumber: '103001Table2CreatedBy', + tableId: '103001Table2', + tableName: '文件信息表', + columnProp: 'createBy', + headerAlign: 'center', + align: 'center', + columnLabel: '上传人', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 140 + } + ], } }, mounted() { diff --git a/src/views/modules/quotation/requestForQuote.vue b/src/views/modules/quotation/requestForQuote.vue index 19524f5..9d790cb 100644 --- a/src/views/modules/quotation/requestForQuote.vue +++ b/src/views/modules/quotation/requestForQuote.vue @@ -989,6 +989,9 @@ + + + @@ -1039,6 +1042,7 @@ import {getPriceCheckDetailList} from "../../../api/quotation/priceCheckDetail"; import InquiryQuoteDetail from "./inquiry/inquiryQuoteDetail.vue"; import {queryCustomer} from "../../../api/customer/customerInformation"; import {queryProjectByCustomer} from "../../../api/project/project"; +import OssComponents from "../oss/ossComponents.vue"; export default { computed: { @@ -1059,6 +1063,7 @@ export default { }, }, components: { + OssComponents, InquiryQuoteDetail, PriceCheckDetail, TestProperties, @@ -2090,7 +2095,99 @@ export default { projectPartModelFlag: false, contactModelFlag: false, priceCheckDetailList:[], - plmQuotationInformationArr: [] + plmQuotationInformationArr: [], + ossColumns:[ + { + userId: this.$store.state.user.name, + functionId: 103001, + serialNumber: '103001Table2FileName', + tableId: '103001Table2', + tableName: '文件信息表', + columnProp: 'fileName', + headerAlign: 'center', + align: 'center', + columnLabel: '文件名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 140 + }, + { + userId: this.$store.state.user.name, + functionId: 103001, + serialNumber: '103001Table2FileRemark', + tableId: '103001Table2', + tableName: '文件信息表', + columnProp: 'fileRemark', + headerAlign: 'center', + align: 'center', + columnLabel: '备注', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 240 + }, + // { + // userId: this.$store.state.user.name, + // functionId: 103001, + // serialNumber: '103001Table2OrderRef3', + // tableId: '103001Table2', + // 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: 103001, + serialNumber: '103001Table2CreateDate', + tableId: '103001Table2', + tableName: '文件信息表', + columnProp: 'createDate', + headerAlign: 'center', + align: 'center', + columnLabel: '上传时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 140 + }, + { + userId: this.$store.state.user.name, + functionId: 103001, + serialNumber: '103001Table2CreatedBy', + tableId: '103001Table2', + tableName: '文件信息表', + columnProp: 'createBy', + headerAlign: 'center', + align: 'center', + columnLabel: '上传人', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 140 + } + ], } }, mounted() { diff --git a/src/views/modules/quotation/sellForQuotation.vue b/src/views/modules/quotation/sellForQuotation.vue index ca0096f..51f8dac 100644 --- a/src/views/modules/quotation/sellForQuotation.vue +++ b/src/views/modules/quotation/sellForQuotation.vue @@ -169,6 +169,10 @@ + + + + @@ -196,7 +200,7 @@ 客户编码 + clearable @change="clearCustomer" @blur="handleQueryCustomer"/> @@ -212,7 +216,7 @@ @click="clickProject">项目编码 + clearable @blur="handleQueryProjectByCustomer"/> @@ -411,10 +415,12 @@ import {getQuotePage} from "../../../api/quotation/quote"; import {queryCustomer} from "../../../api/customer/customerInformation"; import {queryProjectByCustomer} from "../../../api/project/project"; import ApprovalInformation from "../changeManagement/approvalInformation.vue"; +import OssComponents from "../oss/ossComponents.vue"; export default { components: { ApprovalInformation, + OssComponents, QuoteDetail, Chooselist, quotationExamineAndApprove, @@ -778,10 +784,107 @@ export default { //内部报价单搜索表格数据对象 quotationNoData: [], // 行对象 - quotationHeader: {}, + quotationHeader: { + quotationNo: "", + versionCode: "", + site: "", + }, // 按钮防重复 insertQuotationHeaderBtn: false, approvalList: [], + + ossColumns:[ + { + userId: this.$store.state.user.name, + functionId: 103001, + serialNumber: '103001Table2FileName', + tableId: '103001Table2', + tableName: '文件信息表', + columnProp: 'fileName', + headerAlign: 'center', + align: 'center', + columnLabel: '文件名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 140 + }, + { + userId: this.$store.state.user.name, + functionId: 103001, + serialNumber: '103001Table2FileRemark', + tableId: '103001Table2', + tableName: '文件信息表', + columnProp: 'fileRemark', + headerAlign: 'center', + align: 'center', + columnLabel: '备注', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 240 + }, + // { + // userId: this.$store.state.user.name, + // functionId: 103001, + // serialNumber: '103001Table2OrderRef3', + // tableId: '103001Table2', + // 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: 103001, + serialNumber: '103001Table2CreateDate', + tableId: '103001Table2', + tableName: '文件信息表', + columnProp: 'createDate', + headerAlign: 'center', + align: 'center', + columnLabel: '上传时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 140 + }, + { + userId: this.$store.state.user.name, + functionId: 103001, + serialNumber: '103001Table2CreatedBy', + tableId: '103001Table2', + tableName: '文件信息表', + columnProp: 'createBy', + headerAlign: 'center', + align: 'center', + columnLabel: '上传人', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 140 + } + ], } }, methods: { @@ -1324,7 +1427,50 @@ export default { this.initData();//初始化数据 } this.initPage = true; - } + }, + handleQueryCustomer(){ + let params = { + site:this.$store.state.user.site, + customerNo:this.insertData.customerNo + } + queryCustomer(params).then(({data})=>{ + if (data && data.code === 0 ) { + if (data.rows && data.rows.length === 1){ + this.insertData.customerName = data.rows[0].customerDesc + }else { + this.insertData.customerName = '' + } + }else { + this.$message.warning(data.msg) + } + }).catch((error)=>{ + this.$message.error(error) + }) + }, + handleQueryProjectByCustomer(){ + let params = { + site:this.$store.state.user.site, + customerId:this.insertData.customerNo, + projectId:this.insertData.projectId + } + queryProjectByCustomer(params).then(({data})=>{ + if (data && data.code === 0 ){ + if (data.rows && data.rows.length === 1){ + this.insertData.projectName = data.rows[0].projectName + this.insertData.finalCustomerId = data.rows[0].finalCustomerId + this.insertData.finalCustomerName = data.rows[0].finalCustomerName + }else { + this.insertData.projectName = '' + this.insertData.finalCustomerId = '' + this.insertData.finalCustomerName = '' + } + }else { + this.$message.warning(data.msg) + } + }).catch((error)=>{ + this.$message.error(error) + }) + }, }, computed: {}, watch: { diff --git a/src/views/modules/test/file/testFile.vue b/src/views/modules/test/file/testFile.vue index e2c774d..69f4601 100644 --- a/src/views/modules/test/file/testFile.vue +++ b/src/views/modules/test/file/testFile.vue @@ -88,8 +88,8 @@ export default { }, previewFile(row){ // 预览文件 - let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']; let type = ''; + let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']; if (image.includes(row.fileType.toLowerCase())){ type = 'image/' + row.fileType; } @@ -104,13 +104,6 @@ export default { } let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']; if (office.includes(row.fileType.toLowerCase())){ - // if (row.fileType.toLowerCase() === 'doc' || row.fileType.toLowerCase() === 'docx'){ - // type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; - // } else if (row.fileType.toLowerCase() === 'ppt' || row.fileType.toLowerCase() === 'pptx'){ - // type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; - // } else { - // type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; - // } this.$message.warning(`该文件格式暂不支持预览`) return }