diff --git a/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js b/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js index b9c2393e..35ba5a4e 100644 --- a/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js +++ b/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js @@ -1,4 +1,5 @@ import request from '@/utils/request' +import state from '@/store' // 查询表格数据 export function searchtable(check1, ManufacturerAbbreviation, check2, starttime, endTime, pageCurrent, pageSize) { @@ -6,6 +7,7 @@ export function searchtable(check1, ManufacturerAbbreviation, check2, starttime, url: '', method: 'post', data: { + UserID: state.state.user.id, type: '1', name: '车间生产管理工艺_外协付款_查询', param: '外协厂家_check=' + check1 + '&外协厂家=' + ManufacturerAbbreviation + '&时间_check=' + check2 + '&开始时间=' + starttime + '&结束时间=' + endTime, diff --git a/src/utils/curd.js b/src/utils/curd.js index 5bbc55eb..d28337aa 100644 --- a/src/utils/curd.js +++ b/src/utils/curd.js @@ -1,10 +1,12 @@ -/** -Created by hedekun -20180727 - */ +import { ExcelDownLoad } from '@/utils/request' + import { type } from './tool' // type判断传入值的类型,比typeof更详细 export default { install(Vue) { + Vue.prototype.exportExcel_NPOI = function(param) { + console.log(ExcelDownLoad, param, 1111111111) + download(`${ExcelDownLoad}?param=${param}`) + } Vue.prototype.CreateData = function(type, name, data, pageSize, pageList) { var paramStr = '' var paramarray = [] @@ -268,3 +270,39 @@ export default { } } } +function download(url) { + getBlob(url, function(blob, filename) { + saveAs(blob, filename) + }) +} +// function decodeUtf8(bytes) { var encoded = ''; for (var i = 0; i < bytes.length; i++) { encoded += '%' + bytes[i].toString(16) } return decodeURIComponent(encoded) } +function getBlob(url, cb) { + var xhr = new XMLHttpRequest() + xhr.open('GET', url, true) + xhr.responseType = 'blob' + xhr.onload = function() { + if (xhr.status === 200) { + const name = xhr.getResponseHeader('content-disposition').split('=')[1] + var filename1 = decodeURIComponent(name) + cb(xhr.response, filename1) + } + } + xhr.send() +} + +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) + } +} diff --git a/src/views/Assembly/AssemblyQualityInspection/index.vue b/src/views/Assembly/AssemblyQualityInspection/index.vue index 602840bf..f0e65ed5 100644 --- a/src/views/Assembly/AssemblyQualityInspection/index.vue +++ b/src/views/Assembly/AssemblyQualityInspection/index.vue @@ -33,9 +33,9 @@ :label="item.label" :value="item.value"/> - 查询 + 查询 - 导出 + 导出 @@ -177,7 +177,7 @@ export default { selecttable22(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.TestValue, this.check4, this.qualityInspectionValue).then(response => { import('@/vendor/Export2Excel').then(excel => { const tHeader = ['是否合格', '机床图号', '机床名称', '组号', '部件名称', '检测项', '检测项明细', '备注'] - const filterVal = ['是否合格', '机床图号', '机床名称', '组号', '组件名称', '检测项', '检测项明细', '备注'] + const filterVal = ['合格情况', '机床图号', '机床名称', '组号', '组件名称', '检测项', '检测项明细', '备注'] const list = response.data const data = this.formatJson(filterVal, list) excel.export_json_to_excel({ diff --git a/src/views/Assembly/QualityBasicData/index.vue b/src/views/Assembly/QualityBasicData/index.vue index 128da7f9..f138abeb 100644 --- a/src/views/Assembly/QualityBasicData/index.vue +++ b/src/views/Assembly/QualityBasicData/index.vue @@ -6,7 +6,7 @@
不合格原因
- 新增 + 新增 删除 + @click="handleDelete(scope.row)"/> @@ -43,7 +42,7 @@
不合格处理
- 新增 + 新增 删除 + @click="handleDelete(scope.row)"/> @@ -73,7 +71,7 @@
质检尺寸
- 新增 + 新增 删除 + @click="handleDelete(scope.row)"/> @@ -110,7 +107,7 @@
质检形位
- 增加 + 增加 删除 + @click="handleDelete(scope.row)"/> @@ -142,7 +138,7 @@
质检外观
- 增加 + 增加 删除 + @click="handleDelete(scope.row)"/> @@ -172,7 +167,7 @@
检测项
- 增加 + 增加 删除 + @click="handleDelete(scope.row)"/> @@ -202,7 +196,7 @@
检测项明细
- 增加 + 增加 删除 + @click="handleDelete(scope.row)"/> diff --git a/src/views/Assembly/QualityInspectionInformationInquiry/index.vue b/src/views/Assembly/QualityInspectionInformationInquiry/index.vue index c176ac3e..bae344a4 100644 --- a/src/views/Assembly/QualityInspectionInformationInquiry/index.vue +++ b/src/views/Assembly/QualityInspectionInformationInquiry/index.vue @@ -59,9 +59,9 @@ :label="item.label" :value="item.value"/> - 查询 + 查询 - 导出 + 导出 @@ -579,7 +579,7 @@ export default { selecttable22(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue, this.check5, this.startTime, this.check6, this.endTime, this.check7, this.qualityInspectionValue, this.check8, this.personNum).then(response => { import('@/vendor/Export2Excel').then(excel => { const tHeader = ['是否禁用', '机床图号', '机床名称', '组号', '零件图号', '零件名称', '零件数量', '规格或材料', '工序名称', '质检类型', '检验数量', '不合格数量', '不合格原因', '处理结果', '质检时间', '备注'] - const filterVal = ['是否禁用', '机床图号', '机床名称', '组号', '零件图号', '零件名称', '零件数量', '规格或材料', '工艺名称', '质检类型', '数量', '不合格数量', '不合格原因文本', '不合格处理文本', '操作时间', '备注'] + const filterVal = ['禁用情况', '机床图号', '机床名称', '组号', '零件图号', '零件名称', '零件数量', '规格或材料', '工艺名称', '质检类型', '数量', '不合格数量', '不合格原因文本', '不合格处理文本', '操作时间', '备注'] const list = response.data const data = this.formatJson(filterVal, list) excel.export_json_to_excel({ diff --git a/src/views/Inventory/Inboundscanning/index.vue b/src/views/Inventory/Inboundscanning/index.vue index 92e3f4f7..6be72ee7 100644 --- a/src/views/Inventory/Inboundscanning/index.vue +++ b/src/views/Inventory/Inboundscanning/index.vue @@ -4,7 +4,7 @@ 零件图号 - 查询 + 查询 清空 diff --git a/src/views/Inventory/MaterialOut/index.vue b/src/views/Inventory/MaterialOut/index.vue index b9199e7f..303e2e83 100644 --- a/src/views/Inventory/MaterialOut/index.vue +++ b/src/views/Inventory/MaterialOut/index.vue @@ -4,9 +4,9 @@
领料单编号: - 查询 + 查询 - 领料确认 + 领料确认
@@ -680,3 +680,20 @@ export default { background: #E9F0F9 !important; } + diff --git a/src/views/Inventory/SelfMadePartsWarehouseOut/index.vue b/src/views/Inventory/SelfMadePartsWarehouseOut/index.vue index 809cac35..2ffe89b8 100644 --- a/src/views/Inventory/SelfMadePartsWarehouseOut/index.vue +++ b/src/views/Inventory/SelfMadePartsWarehouseOut/index.vue @@ -24,8 +24,8 @@ - 查询 - 出库 + 查询 + 出库 diff --git a/src/views/Inventory/StockInquiry/index.vue b/src/views/Inventory/StockInquiry/index.vue index 91cda143..e44add6d 100644 --- a/src/views/Inventory/StockInquiry/index.vue +++ b/src/views/Inventory/StockInquiry/index.vue @@ -22,7 +22,7 @@ 零件图号: - 查询 + 查询 diff --git a/src/views/ManufacturingCenter/AddingOrder/index.vue b/src/views/ManufacturingCenter/AddingOrder/index.vue index d476923f..1e3a5ed4 100644 --- a/src/views/ManufacturingCenter/AddingOrder/index.vue +++ b/src/views/ManufacturingCenter/AddingOrder/index.vue @@ -19,9 +19,9 @@ :value="item.value"/> - 查询 - 加序 - 删除加序 + 查询 + 加序 + 删除加序 diff --git a/src/views/ManufacturingCenter/ContractDetailsInquiry/index.vue b/src/views/ManufacturingCenter/ContractDetailsInquiry/index.vue index dd0f8609..76c40d39 100644 --- a/src/views/ManufacturingCenter/ContractDetailsInquiry/index.vue +++ b/src/views/ManufacturingCenter/ContractDetailsInquiry/index.vue @@ -31,7 +31,7 @@ 计划总工时(小时): - 查询 + 查询 diff --git a/src/views/ManufacturingCenter/Enter0therData/index.vue b/src/views/ManufacturingCenter/Enter0therData/index.vue index 3ba78ae4..3e5a55df 100644 --- a/src/views/ManufacturingCenter/Enter0therData/index.vue +++ b/src/views/ManufacturingCenter/Enter0therData/index.vue @@ -17,9 +17,9 @@ - 保存 - 编辑 - 删除 + 保存 + 编辑 + 删除 - 查询 + 查询 diff --git a/src/views/ManufacturingCenter/ManHourAnalysis/index.vue b/src/views/ManufacturingCenter/ManHourAnalysis/index.vue index 94c8f275..7686671e 100644 --- a/src/views/ManufacturingCenter/ManHourAnalysis/index.vue +++ b/src/views/ManufacturingCenter/ManHourAnalysis/index.vue @@ -18,7 +18,7 @@ style="width: 170px;margin:0px 10px" type="date" placeholder="选择加工完成日期"/> - 查询 + 查询
@@ -34,7 +34,7 @@ :value="item.value"/> - 查询 + 查询
@@ -49,7 +49,7 @@ 不合格数量统计 - 查询 + 查询
@@ -73,7 +73,7 @@ style="width: 160px" type="date" placeholder="选择日期"/> - 查询 + 查询
@@ -90,7 +90,7 @@ :value="item.value"/> - 查询 + 查询
diff --git a/src/views/ManufacturingCenter/ProcessingStatus/index.vue b/src/views/ManufacturingCenter/ProcessingStatus/index.vue index da00be87..fff065c3 100644 --- a/src/views/ManufacturingCenter/ProcessingStatus/index.vue +++ b/src/views/ManufacturingCenter/ProcessingStatus/index.vue @@ -47,9 +47,9 @@ style="width: 160px" type="date" placeholder="选择日期"/> - 查询 + 查询 - 导出 + 导出 diff --git a/src/views/ManufacturingCenter/ProcessingStatusNew/index.vue b/src/views/ManufacturingCenter/ProcessingStatusNew/index.vue index e459cc65..8e4f13d4 100644 --- a/src/views/ManufacturingCenter/ProcessingStatusNew/index.vue +++ b/src/views/ManufacturingCenter/ProcessingStatusNew/index.vue @@ -21,8 +21,8 @@ :value="item.value"/> - 查询 - 导出 + 查询 + 导出 diff --git a/src/views/ManufacturingCenter/ProjectPlanningManagement/index.vue b/src/views/ManufacturingCenter/ProjectPlanningManagement/index.vue index 3e89344a..a9fad44e 100644 --- a/src/views/ManufacturingCenter/ProjectPlanningManagement/index.vue +++ b/src/views/ManufacturingCenter/ProjectPlanningManagement/index.vue @@ -28,7 +28,7 @@

交货期:

~ - 查询 + 查询
@@ -247,7 +247,7 @@

子计划:{{ machineNum }} 备料

子计划:{{ machineNum }} 制造

子计划:{{ machineNum }} 装配

- 增加 + 增加