From bd56a451250e8b8d7b25526cd36b1949d96d38fa Mon Sep 17 00:00:00 2001
From: Vergil <974548713@qq.com>
Date: Sat, 8 Feb 2020 18:30:18 +0800
Subject: [PATCH 1/7] =?UTF-8?q?curd=E5=A4=96=E5=8D=8F=E4=BB=98=E6=AC=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../OutsourcingPaymentPlanManagement.js | 2 +
src/utils/curd.js | 41 ++++++++++
.../index.vue | 79 ++++++-------------
3 files changed, 68 insertions(+), 54 deletions(-)
diff --git a/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js b/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js
index b9c2393e..69d7ff29 100644
--- a/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js
+++ b/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js
@@ -1,7 +1,9 @@
import request from '@/utils/request'
+import state from '@/store'
// 查询表格数据
export function searchtable(check1, ManufacturerAbbreviation, check2, starttime, endTime, pageCurrent, pageSize) {
+ console.log(state.state.user.id, 22222)
return request({
url: '',
method: 'post',
diff --git a/src/utils/curd.js b/src/utils/curd.js
index 5bbc55eb..0fe3334c 100644
--- a/src/utils/curd.js
+++ b/src/utils/curd.js
@@ -5,6 +5,10 @@ Created by hedekun
import { type } from './tool' // type判断传入值的类型,比typeof更详细
export default {
install(Vue) {
+ Vue.prototype.exportExcel_NPOI = function(url, type, name, data) {
+ console.log(url, type, name, data, 1111111111)
+ // this.download(`${url}?param=${data}`)
+ }
Vue.prototype.CreateData = function(type, name, data, pageSize, pageList) {
var paramStr = ''
var paramarray = []
@@ -268,3 +272,40 @@ export default {
}
}
}
+
+// function download(url) {
+// getBlob(url, function(blob, filename) {
+// var filename1 = decodeURIComponent(filename)
+// saveAs(blob, filename1)
+// })
+// }
+//
+// 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) {
+// var name = decodeUtf8(xhr.getResponseHeader('content-disposition').split('=')[1])
+// }
+// }
+// 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
+// link.style.display = 'none'
+// body.appendChild(link)
+// link.click()
+// body.removeChild(link)
+// window.URL.revokeObjectURL(link.href)
+// }
+// }
diff --git a/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue b/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue
index dd993dd0..76cddbc7 100644
--- a/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue
+++ b/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue
@@ -7,7 +7,7 @@
查询
-
+
{{ scope.row.外协厂家名称 }}
@@ -20,7 +20,7 @@
- {{ parseFloat(scope.row.开票金额).toFixed(2) }}
+ {{ scope.row.开票金额 }}
@@ -53,36 +53,24 @@
-
-
+
+ 开票明细:
+ 新增
+
+
+
{{ scope.row.外协厂家名称 }}
-
+
{{ scope.row.总价 }}
-
+
- {{ parseFloat(scope.row.开票金额).toFixed(2) }}
-
-
-
-
- {{ scope.row.备注 }}
-
-
-
-
- {{ scope.row.备注 }}
-
-
-
-
- 编辑
- 删除
+ {{ scope.row.开票金额 }}
@@ -99,38 +87,21 @@
-
-
+
+ 付款明细:
+ 新增
+
+
+
{{ scope.row.外协厂家名称 }}
-
+
{{ scope.row.总价 }}
-
-
- {{ parseFloat(scope.row.开票金额).toFixed(2) }}
-
-
-
-
- {{ scope.row.备注 }}
-
-
-
-
- {{ scope.row.备注 }}
-
-
-
-
- 编辑
- 删除
-
-
-
+
@@ -205,7 +176,7 @@ export default {
ManufacturerName: '', // 外协厂家
外协厂家流水号: '',
title1: '',
- dialogFormVisible: false,
+ dialogFormVisible1: false,
form: {
外协厂家: '',
发票号: '',
@@ -314,7 +285,7 @@ export default {
this.form.接收时间 = ''
this.form.备注 = ''
this.form.外协厂家 = ''
- this.dialogFormVisible = true
+ this.dialogFormVisible1 = true
},
// 增加确定
editType() {
@@ -330,7 +301,7 @@ export default {
this.$message.error('信息增加失败')
}
})
- this.dialogFormVisible = false
+ this.dialogFormVisible1 = false
},
// 编辑打开
handleChange1(index, row, formName) {
@@ -342,7 +313,7 @@ export default {
this.form.接收人 = row.接收人
this.form.接收时间 = row.接收时间
this.form.备注 = row.备注
- this.dialogFormVisible = true
+ this.dialogFormVisible1 = true
this.title1 = '编辑'
this.CoManufacturerFlowNumber1 = row.id
},
@@ -360,7 +331,7 @@ export default {
this.$message.error('信息修改失败')
}
})
- this.dialogFormVisible = false
+ this.dialogFormVisible1 = false
},
// 提交添加或者修改
submit(formName) {
@@ -378,7 +349,7 @@ export default {
},
// 重置表单
callOff(formName) {
- this.dialogFormVisible = false
+ this.dialogFormVisible1 = false
this.$refs[formName].resetFields()
},
// 删除
From 6544fe4823bbad5420cebec0931ce8e56bdd9345 Mon Sep 17 00:00:00 2001
From: sujiaqi
Date: Sat, 8 Feb 2020 21:27:55 +0800
Subject: [PATCH 2/7] =?UTF-8?q?=E5=88=B6=E9=80=A0=E4=B8=AD=E5=BF=83-?=
=?UTF-8?q?=E9=87=91=E5=B7=A5=EF=BC=8C=E5=88=B6=E9=80=A0=E4=B8=AD=E5=BF=83?=
=?UTF-8?q?-=E9=87=87=E8=B4=AD=E9=83=A8=E9=87=87=E8=B4=AD=EF=BC=88?=
=?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=86=E9=85=8D=EF=BC=8C=E9=87=87=E8=B4=AD?=
=?UTF-8?q?=E8=AF=A2=E4=BB=B7=EF=BC=8C=E9=87=87=E8=B4=AD=E5=90=88=E5=90=8C?=
=?UTF-8?q?=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/Inventory/Inboundscanning/index.vue | 2 +-
.../SelfMadePartsWarehouseOut/index.vue | 4 +-
src/views/Inventory/StockInquiry/index.vue | 2 +-
.../ManufacturingCenter/AddingOrder/index.vue | 6 +--
.../Enter0therData/index.vue | 8 ++--
.../ManHourAnalysis/index.vue | 10 ++---
.../ProcessingStatus/index.vue | 4 +-
.../ProcessingStatusNew/index.vue | 4 +-
.../ScheduleCompletionDetails/index.vue | 6 +--
.../maintainInformation/index.vue | 37 ++++++++++++++-----
.../CreateInquirySheet/index.vue | 22 ++++++-----
.../CreatePurchaseContract/index.vue | 6 +--
.../PurchaseTaskAllocate/index.vue | 15 +++++---
13 files changed, 75 insertions(+), 51 deletions(-)
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/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/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/ScheduleCompletionDetails/index.vue b/src/views/ManufacturingCenter/ScheduleCompletionDetails/index.vue
index c469cd22..81782d5d 100644
--- a/src/views/ManufacturingCenter/ScheduleCompletionDetails/index.vue
+++ b/src/views/ManufacturingCenter/ScheduleCompletionDetails/index.vue
@@ -16,12 +16,12 @@
style="width: 170px;margin:0px 10px"
type="date"
placeholder="选择加工完成日期"/>
- 查询
+ 查询
-
+
{{ scope.row.姓名 }}
@@ -65,7 +65,7 @@
-
+
{{ scope.row.零件图号 }}
diff --git a/src/views/ManufacturingCenter/maintainInformation/index.vue b/src/views/ManufacturingCenter/maintainInformation/index.vue
index 1057ab52..2299edd2 100644
--- a/src/views/ManufacturingCenter/maintainInformation/index.vue
+++ b/src/views/ManufacturingCenter/maintainInformation/index.vue
@@ -12,11 +12,11 @@
:value="item.value"/>
选择月份:
-
- 导出日点检表
+
+ 导出日点检表
-
+
@@ -49,7 +49,7 @@
点检类型、点检内容维护
-
+
@@ -61,13 +61,14 @@
- 新增
+
+ 新增
确定
取消
- 编辑
- 删除
+
+
@@ -105,13 +106,14 @@
- 新增
+
+ 新增
确定
取消
- 编辑
- 删除
+
+
@@ -745,6 +747,21 @@ export default {
+
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/Outsourcing/OutsourcingPaymentPlanManagement/index.vue b/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue
index 7c5c8d2a..d1ace90f 100644
--- a/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue
+++ b/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue
@@ -5,7 +5,7 @@
外协厂家:
- 查询
+ 查询
@@ -55,7 +55,7 @@
开票明细:
- 新增
+ 新增
@@ -89,7 +89,7 @@
付款明细:
- 新增
+ 新增
@@ -422,3 +422,20 @@ export default {
background: #AEF199;
}
+
diff --git a/src/views/Outsourcing/OutsourcingTaskExecution/index.vue b/src/views/Outsourcing/OutsourcingTaskExecution/index.vue
index 2bfd12e4..e19386cd 100644
--- a/src/views/Outsourcing/OutsourcingTaskExecution/index.vue
+++ b/src/views/Outsourcing/OutsourcingTaskExecution/index.vue
@@ -3,7 +3,7 @@
零件号:
- 查询
+ 查询
打回车间
-->
厂家:
- 查询
+ 查询
新增
@@ -139,16 +139,16 @@
- 选入零件
- 导出任务单
+ 选入零件
+ 导出任务单
- 提交
+ 提交
- 保存
+ 保存
-
+
{{ 零件图号[scope.$index] }}
@@ -275,7 +275,7 @@
- 查询
+ 查询
From 69d7870b46e789fc1ff8a240219e24d2647f10ea Mon Sep 17 00:00:00 2001
From: Vergil <974548713@qq.com>
Date: Mon, 10 Feb 2020 11:02:50 +0800
Subject: [PATCH 7/7] =?UTF-8?q?=E5=AF=BC=E5=87=BAexcel=E5=85=A8=E5=B1=80?=
=?UTF-8?q?=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/curd.js | 83 +++++++++++++++++++++++------------------------
1 file changed, 40 insertions(+), 43 deletions(-)
diff --git a/src/utils/curd.js b/src/utils/curd.js
index 0fe3334c..d28337aa 100644
--- a/src/utils/curd.js
+++ b/src/utils/curd.js
@@ -1,13 +1,11 @@
-/**
-Created by hedekun
-20180727
- */
+import { ExcelDownLoad } from '@/utils/request'
+
import { type } from './tool' // type判断传入值的类型,比typeof更详细
export default {
install(Vue) {
- Vue.prototype.exportExcel_NPOI = function(url, type, name, data) {
- console.log(url, type, name, data, 1111111111)
- // this.download(`${url}?param=${data}`)
+ 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 = ''
@@ -272,40 +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 download(url) {
-// getBlob(url, function(blob, filename) {
-// var filename1 = decodeURIComponent(filename)
-// saveAs(blob, filename1)
-// })
-// }
-//
-// 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) {
-// var name = decodeUtf8(xhr.getResponseHeader('content-disposition').split('=')[1])
-// }
-// }
-// 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
-// link.style.display = 'none'
-// body.appendChild(link)
-// link.click()
-// body.removeChild(link)
-// window.URL.revokeObjectURL(link.href)
-// }
-// }
+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)
+ }
+}