diff --git a/src.zip b/src.zip deleted file mode 100644 index 94630d32..00000000 Binary files a/src.zip and /dev/null differ diff --git a/src/utils/request.js b/src/utils/request.js index 39a2860d..1aaa917f 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -18,7 +18,6 @@ export const uploadPerson = `http://123.56.95.229:8010/submit/uploadPerson.ashx` export const uploadOP = `http://123.56.95.229:8010/submit/uploadOP.ashx` export const url = `http://123.56.95.229:8010/submit/MESCommonBase.ashx` // 采购件入库、离线件入库 export const ExcelDownLoad = 'http://123.56.95.229:8010/submit/MESDownloadExcel.ashx' // 导出excel -export const ExcelWaiGou = 'http://123.56.95.229:8010/submit/excel.ashx' // 导出excel // 技术中心程序发布时要更改下面所有的IP到0段 export const ServerIP = `http://123.56.95.229:8010/webpage/file/` export const uploadFileMachine = `http://123.56.95.229:8010/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231 diff --git a/src/views/WorkshopProcurement/NewArrivalList/index.vue b/src/views/WorkshopProcurement/NewArrivalList/index.vue index 639fad8e..e65df228 100644 --- a/src/views/WorkshopProcurement/NewArrivalList/index.vue +++ b/src/views/WorkshopProcurement/NewArrivalList/index.vue @@ -501,7 +501,6 @@ import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchTable5, searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6, searchLxPurchaseOrder, searchLxMateriel } from '@/api/WorkshopProcurement/NewArrivalList.js' import { mapGetters } from 'vuex' -import { ExcelWaiGou } from '@/utils/request' export default { data() { return { @@ -951,9 +950,7 @@ export default { this.sup = row.供应商名称 this.num1 = row.到货单流水号 this.num2 = row.到货单编号 - console.log(row, 22222) this.excle_row = row - console.log(this.userId, this.id) this.disable = row.是否关联 this.tableData6 = [] this.到货单流水号 = row.到货单流水号 @@ -1104,7 +1101,6 @@ export default { }, handleSelectionChange(val) { this.arrest = val - console.log(this.arrest) }, // 选入 addMateriel() { @@ -1167,63 +1163,15 @@ export default { }) }, downloadExcel() { - console.log(this.num2, 222222222) var param = [] param[0] = ['到货单流水号', this.num1] param[1] = ['编号', this.num2] param[2] = ['供应商', this.sup] var Data = this.CreateData('12', '报表_备料管理_到货单明细查询', param) this.exportExcel_NPOI(Data) - - // const _ExcelWaiGou = ExcelWaiGou - // this.download(`${_ExcelWaiGou}?type=Excel_NewArrivalList&folename=外购单&rec1=${this.excle_row.到货单流水号}&rec2=${this.excle_row.到货单流水号}&rec3=${this.excle_row.到货单流水号}&rec4=${this.excle_row.到货单流水号}`) - }, - /** - * 下载 - * @param {String} url 目标文件地址 - * @param {String} filename 想要保存的文件名称 - */ - download(url) { - this.getBlob(url, function(blob, filename) { - saveAs(blob, filename) - }) - }, - getBlob(url, cb) { - var xhr = new XMLHttpRequest() - xhr.open('GET', url, true) - xhr.responseType = 'blob' - xhr.onload = function() { - if (xhr.status === 200) { - console.log(xhr, 1111) - const name = xhr.getResponseHeader('content-disposition').split('=')[1] - cb(xhr.response, name) - } - } - xhr.send() } } } -/** - * 保存 - * @param {Blob} blob - * @param {String} filename 想要保存的文件名称 - */ -function saveAs(blob, filename = '下载文件.xls') { - if (window.navigator.msSaveOrOpenBlob) { - navigator.msSaveBlob(blob, filename) - } else { - var link = document.createElement('a') - var body = document.querySelector('body') - link.href = window.URL.createObjectURL(blob) - link.download = filename - // fix Firefox - link.style.display = 'none' - body.appendChild(link) - link.click() - body.removeChild(link) - window.URL.revokeObjectURL(link.href) - } -}