diff --git a/package-lock.json b/package-lock.json index dd8bca1..eb93a56 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,21 @@ "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==", "dev": true }, + "@vue-office/docx": { + "version": "1.6.2", + "resolved": "https://mirrors.cloud.tencent.com/npm/@vue-office/docx/-/docx-1.6.2.tgz", + "integrity": "sha512-OHAoUHeY8nHjhWvwDhlPx+/rmRkxmqLpvPgtfCEOZ4H1c1LCdJ6eDbdV3152ww8dcdZ7fgGQu3fmSSaI7JwdpQ==" + }, + "@vue-office/excel": { + "version": "1.7.11", + "resolved": "https://mirrors.cloud.tencent.com/npm/@vue-office/excel/-/excel-1.7.11.tgz", + "integrity": "sha512-LF3R9IV573Sf4qTu6Ik5Ee8UMfkrsZQ6HEQE25/2m1c0CMcHX6KanIy6Cz0b0Q+FrLH3TjIsLTm6oPcqAbDGSA==" + }, + "@vue/composition-api": { + "version": "1.7.2", + "resolved": "https://mirrors.cloud.tencent.com/npm/@vue/composition-api/-/composition-api-1.7.2.tgz", + "integrity": "sha512-M8jm9J/laYrYT02665HkZ5l2fWTK4dcVg3BsDHm/pfz+MjDYwX+9FUaZyGwEyXEDonQYRCo0H7aLgdklcIELjw==" + }, "abab": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", @@ -10107,7 +10122,7 @@ }, "moment": { "version": "2.30.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "resolved": "https://mirrors.cloud.tencent.com/npm/moment/-/moment-2.30.1.tgz", "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" }, "move-concurrently": { @@ -19185,6 +19200,11 @@ "tiny-cookie": "^1.0" } }, + "vue-demi": { + "version": "0.14.10", + "resolved": "https://mirrors.cloud.tencent.com/npm/vue-demi/-/vue-demi-0.14.10.tgz", + "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==" + }, "vue-hot-reload-api": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.3.tgz", diff --git a/package.json b/package.json index b555fec..89a9bfd 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,9 @@ "build": "gulp" }, "dependencies": { - "qrcode": "^1.5.3", + "@vue-office/docx": "^1.6.2", + "@vue-office/excel": "^1.7.11", + "@vue/composition-api": "^1.7.2", "axios": "0.17.1", "babel-plugin-component": "0.10.1", "babel-polyfill": "6.26.0", @@ -32,11 +34,13 @@ "node-sass": "4.13.1", "npm": "^6.9.0", "pubsub-js": "^1.9.3", + "qrcode": "^1.5.3", "sass-loader": "6.0.6", "svg-sprite-loader": "3.7.3", "v-viewer": "^1.6.4", "vue": "2.6.10", "vue-cookie": "1.1.4", + "vue-demi": "^0.14.10", "vue-i18n": "^8.25.0", "vue-json-excel": "^0.3.0", "vue-pdf": "^4.3.0", diff --git a/src/api/auth/auth.js b/src/api/auth/auth.js index 63a00a2..16d1cb3 100644 --- a/src/api/auth/auth.js +++ b/src/api/auth/auth.js @@ -33,3 +33,5 @@ export const authRuleStepSave = data => createAPI(`auth/authRuleStepSave`,'post' export const authRuleStepDelete = data => createAPI(`auth/authRuleStepDelete`,'post',data) export const authRuleStepEdit = data => createAPI(`auth/authRuleStepEdit`,'post',data) + +export const getBusinessTypeList = data => createAPI(`auth/getBusinessTypeList`,'post',data) diff --git a/src/api/inquiry/inquiryDetail.js b/src/api/inquiry/inquiryDetail.js index 8652be8..64a662f 100644 --- a/src/api/inquiry/inquiryDetail.js +++ b/src/api/inquiry/inquiryDetail.js @@ -14,3 +14,5 @@ export const updateInquiryPartItemList = data => createAPI(`/inquiry/inquiryDeta export const searchInquiryDetailHeaderInfo = data => createAPI(`/inquiry/inquiryDetail/searchInquiryDetailHeaderInfo`,'post',data) +export const searchQuotationRecordInfo = data => createAPI(`/inquiry/inquiryDetail/searchQuotationRecordInfo`,'post',data) + diff --git a/src/api/oss/oss.js b/src/api/oss/oss.js index 77c1e1e..d08b75d 100644 --- a/src/api/oss/oss.js +++ b/src/api/oss/oss.js @@ -1,3 +1,20 @@ import { createAPI } from "@/utils/httpRequest.js"; export const updateOssRef = data => createAPI(`/sys/oss/updateOssRef`,'post',data) + + +/** + * 文件上传 + * @param data + * @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',777) diff --git a/src/router/index.js b/src/router/index.js index 40ff78d..db67bc9 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -20,6 +20,7 @@ const _import = require('./import-' + process.env.NODE_ENV) const globalRoutes = [ { path: '/404', component: _import('common/404'), name: '404', meta: { title: '404未找到' } }, { path: '/login', component: _import('common/login'), name: 'login', meta: { title: '登录' } }, + { path: '/pre', component: _import('common/previewFile'), name: 'pre', meta: { title: '文件预览' } }, { path: '/login-token', component: _import('common/login-token'), name: 'login', meta: { title: '登录' } }, ] diff --git a/src/views/common/previewFile.vue b/src/views/common/previewFile.vue new file mode 100644 index 0000000..a0e7187 --- /dev/null +++ b/src/views/common/previewFile.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/src/views/modules/auth/authGroup.vue b/src/views/modules/auth/authGroup.vue index 5cb79c5..086317e 100644 --- a/src/views/modules/auth/authGroup.vue +++ b/src/views/modules/auth/authGroup.vue @@ -17,6 +17,17 @@ + + + + + + + @@ -89,10 +100,6 @@ :key = "i.buNo" :label = "i.buDesc" :value = "i.buNo"> - {{ i.sitename }} - - {{ i.buDesc }} - @@ -107,6 +114,18 @@ + + + + + + + @@ -225,7 +244,8 @@ import { authGroupSearch, // 审批组信息列表查询 authGroupSave, // 审批组信息新增 authGroupEdit, // 审批组信息编辑 - authGroupDelete // 审批组信息删除 + authGroupDelete, // 审批组信息删除 + getBusinessTypeList, // 业务类型列表查询 } from '@/api/auth/auth' import {getSiteAndBuByUserName} from "@/api/eam/eam.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" @@ -387,6 +407,24 @@ export default { fixed: '', columnWidth: 300 }, + { + userId: this.$store.state.user.name, + functionId: 601005, + serialNumber: '601005Table1RoleDesc', + tableId: '601005Table1', + tableName: '审批组表', + columnProp: 'roleDesc', + headerAlign: 'center', + align: 'center', + columnLabel: '业务类型', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 170 + }, { functionId: 601005, serialNumber: '601005Table1Active', @@ -530,8 +568,16 @@ export default { message: ' ', trigger: 'change' } - ] + ], + recordType:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ], }, + businessTypeSelectList: [], // ======== 模态框开关控制 ======== authSearch: false, authSave: false, @@ -560,6 +606,7 @@ export default { this.getTableUserColumn(this.$route.meta.menuId+'table1',1) // 获取数据列表 this.getDataList() + this.getBusinessRoleList() }, methods: { @@ -613,6 +660,7 @@ export default { buNo: '', groupNo: '', groupDesc: '', + recordType: '', active: 'Y', createBy: this.$store.state.user.name, } @@ -643,6 +691,8 @@ export default { updateBy: this.$store.state.user.name, updateDate: '' } + // 将recordType转为INT + this.modalData.recordType = parseInt(row.recordType) this.modalDisableFlag = true this.modalFlag = true }, @@ -672,6 +722,10 @@ export default { this.$message.warning('请填写邮箱!') return } + if (this.modalData.recordType === '' || this.modalData.recordType == null) { + this.$message.warning('请选择业务类型!') + return + } if (this.modalData.flag === '1') { this.modalData.buNo = this.modalData.bu.split('_')[1] this.modalData.site = this.$store.state.user.site @@ -838,6 +892,17 @@ export default { selectFlag () { return true }, + getBusinessRoleList() { + let queryData = { + active: 'Y' + } + this.businessTypeSelectList = [] + getBusinessTypeList(queryData).then(({data}) => { + if (data.code == 0) { + this.businessTypeSelectList = data.rows + } + }) + }, // 动态列开始 获取 用户保存的 格式列 async getTableUserColumn(tableId, columnId) { let queryTableUser = { diff --git a/src/views/modules/auth/authRule.vue b/src/views/modules/auth/authRule.vue index 3405465..d05a35c 100644 --- a/src/views/modules/auth/authRule.vue +++ b/src/views/modules/auth/authRule.vue @@ -17,6 +17,17 @@ + + + + + + + @@ -179,7 +190,7 @@ - + @@ -188,7 +199,7 @@ - + + + + + + + + + + + + + + + + - + - + - - - - - - 保存 @@ -316,6 +341,7 @@ import { authRuleStepSave, // 审批规则步骤信息新增 authRuleStepEdit, // 审批规则步骤信息编辑 authRuleStepDelete, // 审批规则步骤信息删除 + getBusinessTypeList, // 业务类型列表查询 } from '@/api/auth/auth' import Chooselist from '@/views/modules/common/Chooselist_eam' import {authBusinessSearch, authGroupSearch} from "../../../api/auth/auth"; @@ -468,6 +494,24 @@ export default { fixed: '', columnWidth: 180 }, + { + userId: this.$store.state.user.name, + functionId: 601005, + serialNumber: '601005Table1RoleDesc', + tableId: '601005Table1', + tableName: '审批规则表', + columnProp: 'roleDesc', + headerAlign: 'center', + align: 'center', + columnLabel: '业务类型', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 170 + }, { functionId: 601005, serialNumber: '601005Table1Active', @@ -930,6 +974,13 @@ export default { trigger: 'change' } ], + recordType:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ], userDisplay:[ { required: true, @@ -952,6 +1003,7 @@ export default { } ], }, + businessTypeSelectList: [], // ======== 模态框开关控制 ======== authSearch: false, authSave: false, @@ -994,6 +1046,7 @@ export default { this.getSiteAndBuByUserName(); // 获取数据列表 this.getDataList() + this.getBusinessRoleList() }, methods: { // 获取用户的bu @@ -1185,6 +1238,8 @@ export default { updateBy: this.$store.state.user.name, updateDate: '' } + // 将recordType转为INT + this.modalData.recordType = parseInt(row.recordType) this.modalDisableFlag = true this.modalFlag = true }, @@ -1248,6 +1303,10 @@ export default { this.$message.warning('请选择状态!') return } + if (this.modalData.recordType === '' || this.modalData.recordType == null) { + this.$message.warning('请选择业务类型!') + return + } if (this.modalData.flag === '1') { this.modalData.buNo = this.modalData.bu.split('_')[1] this.modalData.site = this.$store.state.user.site @@ -1472,6 +1531,18 @@ export default { this.ruleStepModalData.groupDesc = '' }, + getBusinessRoleList() { + let queryData = { + active: 'Y' + } + this.businessTypeSelectList = [] + getBusinessTypeList(queryData).then(({data}) => { + if (data.code == 0) { + this.businessTypeSelectList = data.rows + } + }) + }, + authUserNoBlur () { let params = { username: this.ruleStepModalData.authUserNo, diff --git a/src/views/modules/inquiry/inquiryApplication.vue b/src/views/modules/inquiry/inquiryApplication.vue index 2dfa989..8f3f64c 100644 --- a/src/views/modules/inquiry/inquiryApplication.vue +++ b/src/views/modules/inquiry/inquiryApplication.vue @@ -89,21 +89,21 @@ 查询 新增 - - - - - - - - - - - - - - - + 导入 + + {{ "导出" }} + @@ -356,7 +356,7 @@ + width="690px" style="height: 100%;margin-top: -60px" class="customer-dialog"> @@ -386,7 +386,7 @@
@@ -437,15 +437,18 @@ - + - + 关闭 + + +
@@ -460,6 +463,7 @@ import {queryCustomerList} from "@/api/customer/customer"; import {verifyData} from "@/api/part/partInformation"; import {EventBus} from "../../../main"; import {partInformationSearch} from "../../../api/part/partInformation"; +import quotationUpload from "../quote/quotation_upload.vue"; export default { computed: { @@ -477,6 +481,7 @@ export default { // }, }, components: { + quotationUpload, DictDataSelect, Chooselist }, @@ -1525,7 +1530,13 @@ export default { remark: row.remark, updateBy: this.$store.state.user.name } - this.modalDisableFlag = true + if(this.modalData.buNo === null || this.modalData.buNo === ''){ + this.modalData.buDesc = '' + this.modalData.bu = '' + this.modalDisableFlag = false + }else { + this.modalDisableFlag = true + } this.modalFlag = true }, @@ -1973,11 +1984,8 @@ export default { searchInquiryDetailInfo(tempData).then(({data}) => { if (data.code === 0) { this.inquiryPartDataList = data.page.list - this.pageIndex = data.page.currPage - this.pageSize = data.page.pageSize - this.totalPage = data.page.totalCount //判断是否全部存在数据 - if (this.totalPage > 0) { + if (this.inquiryPartDataList != null && this.inquiryPartDataList.length > 0) { //设置选中行 this.$refs.secondaryTable.setCurrentRow(this.inquiryPartDataList[0]) } @@ -2300,12 +2308,24 @@ export default { async createExportData() { this.searchData.limit = -1 this.searchData.page = 1 - await quotationInformationSearch(this.searchData).then(({data}) => { + await searchInquiryApplicationInfo(this.searchData).then(({data}) => { this.resultList = data.page.list // 遍历dataList 取-后的值 this.resultList.forEach((item) => { - item.projectManagerName = item.projectManager.split('-')[1] - item.projectOwnerName = item.projectOwner.split('-')[1] + if (item.status === 'A') { + item.status = '已报价' + } else if (item.status === 'B') { + item.status = '已下达' + } else if (item.status === 'C') { + item.status = '草稿' + } + if (item.priorityLevel === 'A') { + item.priorityLevel = '普通' + } else if (item.priorityLevel === ' B') { + item.priorityLevel = '重要' + } else if (item.priorityLevel === ' C') { + item.priorityLevel = '紧急' + } }) }) return this.resultList diff --git a/src/views/modules/inquiry/inquiryDetail.vue b/src/views/modules/inquiry/inquiryDetail.vue index bcffaf4..38401a2 100644 --- a/src/views/modules/inquiry/inquiryDetail.vue +++ b/src/views/modules/inquiry/inquiryDetail.vue @@ -96,20 +96,20 @@ 查询 - - - - - - - - - - - - - - + + {{ "导出" }} +
@@ -282,9 +282,49 @@ + + + + + + + + + + @@ -298,16 +338,20 @@ import Chooselist from '@/views/modules/common/Chooselist_eam' import {getSiteAndBuByUserName} from "../../../api/qc/qc"; import {searchInquiryApplicationInfo,addInquiryApplicationInfo,updateInquiryApplicationInfo,deleteInquiryApplicationInfo} from "@/api/inquiry/inquiryApplication"; import {searchInquiryDetailInfo,addInquiryDetailInfo,updateInquiryDetailInfo,deleteInquiryDetailInfo} from "@/api/inquiry/inquiryDetail"; -import {getItemListByInquiryPartAndCodeNo,updateInquiryPartItemList,searchInquiryDetailHeaderInfo} from "@/api/inquiry/inquiryDetail"; +import {getItemListByInquiryPartAndCodeNo,updateInquiryPartItemList,searchInquiryDetailHeaderInfo,searchQuotationRecordInfo} from "@/api/inquiry/inquiryDetail"; import DictDataSelect from "../sys/dict-data-select.vue"; +import OssComponents from "../oss/ossComponents.vue"; import {queryCustomerList} from "@/api/customer/customer"; import {verifyData} from "@/api/part/partInformation"; import {EventBus} from "../../../main"; +import TableColumn from "../../common/table.vue"; export default { components: { + TableColumn, DictDataSelect, - Chooselist + Chooselist, + OssComponents }, computed: { statusDisplay() { @@ -319,6 +363,12 @@ export default { }, data() { return { + // 导出 + exportData: [], + exportName: '询价明细' + this.dayjs().format('YYYYMMDDHHmmss'), + exportHeader: ['询价明细'], + exportFooter: [], + resultList: [], userBuList: [], // ======== 分页 ======== pageIndex: 1, @@ -352,6 +402,7 @@ export default { // ======== 数据列表 ======== dataList: [], inquiryPartItemDataList: [], + inquiryQuotationDataList: [], // ======== 列表表头 ======== columnList: [ { @@ -815,6 +866,370 @@ export default { // columnWidth: 70, // }, ], + columnQuotationList: [ + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table1BuDesc', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'buDesc', + headerAlign: 'center', + align: 'center', + columnLabel: 'BU', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table1QuoteVersionNo', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'quoteVersionNo', + headerAlign: 'center', + align: 'center', + columnLabel: '报价单号', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 180 + }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table1QuoteDate', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'quoteDate', + headerAlign: 'center', + align: 'center', + columnLabel: '报价日期', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table1CustomerNo', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'customerNo', + 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: 5011, + serialNumber: '5011Table1CustomerDesc', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'customerDesc', + headerAlign: 'center', + align: 'left', + columnLabel: '客户名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table1QuoterName', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'quoterName', + headerAlign: 'center', + align: 'left', + columnLabel: '报价专员', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table1PurchaseName', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'purchaseName', + headerAlign: 'center', + align: 'left', + columnLabel: '采购专员', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table1Currency', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'currency', + 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: 5011, + serialNumber: '5011Table1Status', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'status', + 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: 5011, + serialNumber: '5011Table1CustomerInquiryNo', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'customerInquiryNo', + 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: 5011, + serialNumber: '5011Table1InsideInquiryNo', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'insideInquiryNo', + 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: 5011, + serialNumber: '5011Table1CreateBy', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'createBy', + 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: 5011, + serialNumber: '5011Table1CreateDate', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'createDate', + headerAlign: 'center', + align: 'center', + columnLabel: '创建时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 130 + }, + { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table1UpdateBy', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'updateBy', + 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: 5011, + serialNumber: '5011Table1UpdateDate', + tableId: '5011Table1', + tableName: '报价信息表', + columnProp: 'updateDate', + headerAlign: 'center', + align: 'center', + columnLabel: '更新时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 130 + }, + ], + 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: 'createdBy', + headerAlign: 'center', + align: 'center', + columnLabel: '上传人', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 140 + } + ], // ======== 选中的当前行数据 ======== inquiryPartCurrentRow: {}, } @@ -914,6 +1329,9 @@ export default { if (this.activeTable === 'inquiryPartItem') { this.getItemListByInquiryPartAndCodeNo() } + if (this.activeTable === 'inquiryPartQuotation') { + this.getQuotationDataList() + } }, // ======== chooseList相关方法 ======== @@ -1070,11 +1488,86 @@ export default { }) }, + getQuotationDataList(){ + let inData = { + site : this.inquiryPartCurrentRow.site, + rfqNo : this.inquiryPartCurrentRow.rfqNo, + testPartId : this.inquiryPartCurrentRow.testPartId + } + searchQuotationRecordInfo(inData).then(({data}) => { + if (data && data.code === 0) { + this.inquiryQuotationDataList = data.rows; + } else { + this.$message.warning(data.msg) + } + }).catch((error) => { + this.$message.error(error) + }) + }, + + handleQuotationRequest(row) { + // 创建一个array + let ids = [row.id] + this.$router.push({ + name:'quote-index', + params:{ + ids:ids + } + }) + }, + rowStyle({row}) { if (this.inquiryPartCurrentRow.id === row.id) { return {'background-color': '#E8F7F6', cursor: 'pointer'}; } }, + + // ======== 导出相关方法 ======== + /** + * 导出excel + */ + async createExportData() { + this.searchData.limit = -1 + this.searchData.page = 1 + await searchInquiryDetailHeaderInfo(this.searchData).then(({data}) => { + this.resultList = data.page.list + // 遍历dataList 取-后的值 + this.resultList.forEach((item) => { + if (item.status === 'A') { + item.status = '已报价' + } else if (item.status === 'B') { + item.status = '已下达' + } else if (item.status === 'C') { + item.status = '草稿' + } + if (item.priorityLevel === 'A') { + item.priorityLevel = '普通' + } else if (item.priorityLevel === ' B') { + item.priorityLevel = '重要' + } else if (item.priorityLevel === ' C') { + item.priorityLevel = '紧急' + } + }) + }) + return this.resultList + }, + startDownload() { + }, + finishDownload() { + }, + fields() { + let json = '{' + this.columnList.forEach((item, index) => { + if (index == this.columnList.length - 1) { + json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + } else { + json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ',' + } + }) + json += '}' + let s = eval('(' + json + ')') + return s + }, } } diff --git a/src/views/modules/oss/ossComponents.vue b/src/views/modules/oss/ossComponents.vue new file mode 100644 index 0000000..298b548 --- /dev/null +++ b/src/views/modules/oss/ossComponents.vue @@ -0,0 +1,360 @@ + + + + +