diff --git a/favicon.ico b/favicon.ico
index 8f486dbb..8ec6528d 100644
Binary files a/favicon.ico and b/favicon.ico differ
diff --git a/src/vendor/exportExcel.js b/src/vendor/exportExcel.js
index 43ec8c71..ee3824a6 100644
--- a/src/vendor/exportExcel.js
+++ b/src/vendor/exportExcel.js
@@ -12,12 +12,6 @@ export function getExplorer() {
return 'Safari'
}
}
-export function method5(tableid) {
- tableToExcel(tableid)
-}
-export function Cleanup() {
- window.clearInterval(idTmr)
-}
const tableToExcel = (function() {
const uri = 'data:application/vnd.ms-excel;base64,'
const template = `
{worksheet}`
@@ -37,3 +31,10 @@ const tableToExcel = (function() {
}
})()
+export function method5(tableid) {
+ tableToExcel(tableid)
+}
+export function Cleanup() {
+ window.clearInterval(idTmr)
+}
+
diff --git a/src/views/ManufacturingCenter/CreatePreparationBill/exportExcel.js b/src/views/ManufacturingCenter/CreatePreparationBill/exportExcel.js
new file mode 100644
index 00000000..22925cee
--- /dev/null
+++ b/src/views/ManufacturingCenter/CreatePreparationBill/exportExcel.js
@@ -0,0 +1,20 @@
+// 导出Excel方法(表格id,不加扩展名的文件名,sheet名)
+export function exportExcelMethod(tableId, fileName, sheetName) {
+ tableToExcel(tableId, fileName, sheetName)
+ return 1
+}
+const tableToExcel = (function() {
+ const uri = 'data:application/vnd.ms-excel;base64,'
+ // 设置导出表格的单元格默认高度/宽度/边框样式/字体颜色/背景颜色/居中,网页显示表格宽度建议1240,tr/td视情况而定
+ const template = `{worksheet}`
+ const base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }
+ const format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p] }) }
+ return function(table, filename, sheetname) {
+ if (!table.nodeType) table = document.getElementById(table)
+ const ctx = { worksheet: sheetname || 'Worksheet', table: table.innerHTML }
+ const aTag = document.createElement('a')
+ aTag.href = uri + base64(format(template, ctx))
+ aTag.download = filename
+ aTag.click()
+ }
+})()
diff --git a/src/views/ManufacturingCenter/CreatePreparationBill/index.vue b/src/views/ManufacturingCenter/CreatePreparationBill/index.vue
index 03466263..dae8ca1b 100644
--- a/src/views/ManufacturingCenter/CreatePreparationBill/index.vue
+++ b/src/views/ManufacturingCenter/CreatePreparationBill/index.vue
@@ -6,7 +6,8 @@
查询
查询全部
- 导出备料单
+ 导出备料单
+ 导出完成
@@ -78,10 +79,11 @@