diff --git a/src/utils/request.js b/src/utils/request.js index 211dc14c..0a04c177 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,6 +1,6 @@ import axios from 'axios' -export const wsuri = `ws://123.56.95.229:8010//WebMoudule//websocket` +export const wsuri = `ws://123.56.95.229:61101//WebMoudule//websocket` export const name = `OP8888` export const name1 = `OP1000` export const name3 = `OP2000` diff --git a/src/views/PurchasingCenter/PurchaseSituationSearch/index.vue b/src/views/PurchasingCenter/PurchaseSituationSearch/index.vue index 7ae762cf..54c5ccec 100644 --- a/src/views/PurchasingCenter/PurchaseSituationSearch/index.vue +++ b/src/views/PurchasingCenter/PurchaseSituationSearch/index.vue @@ -41,7 +41,7 @@ - 导出 + 导出 @@ -530,6 +530,30 @@ export default { }) }) }, + exportExcel() { + let check, check1, check2, check3 + this.machineNumberValue ? check = 1 : check = 0 + this.groupNumberValue ? check1 = 1 : check1 = 0 + this.Name ? check2 = 1 : check2 = 0 + this.startTime ? check3 = 1 : (check3 = 0, this.startTime = '') + var param = [] + param[0] = ['机床流水号_check', check] + param[1] = ['机床流水号', this.machineNumberValue] + param[2] = ['组件流水号_check', check1] + param[3] = ['组件流水号', this.groupNumberValue] + param[4] = ['零件名称_check', check2] + param[5] = ['零件名称', this.Name] + param[6] = ['时间_check', check3] + if (check3 === 0) { + param[7] = ['开始时间', ''] + param[8] = ['结束时间', ''] + } else { + param[7] = ['开始时间', this.startTime[0]] + param[8] = ['结束时间', this.startTime[1]] + } + var Data = this.CreateData('2001', '报表_采购部采购件_查询数据', param) + this.exportExcel_NPOI(Data) + }, fetchData() { initMachineProject().then(response => { for (let i = 0; i < response.data.length; i++) {