|
@@ -172,6 +172,7 @@ import moment from 'moment'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import ProductType from '@/views/common/productType.js'
|
|
import ProductType from '@/views/common/productType.js'
|
|
import printModal from './printModal.vue'
|
|
import printModal from './printModal.vue'
|
|
|
|
+import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import { checkWarehouseDetailList, checkWarehouseDetailCount, checkWarehouseInventory, checkWarehouseDetail, checkWarehouseDetailSave, checkWarehouseCheckZero, checkWarehouseWarehouse, checkWarehouseDetailExport, checkWarehouseDetailPrint } from '@/api/checkWarehouse'
|
|
import { checkWarehouseDetailList, checkWarehouseDetailCount, checkWarehouseInventory, checkWarehouseDetail, checkWarehouseDetailSave, checkWarehouseCheckZero, checkWarehouseWarehouse, checkWarehouseDetailExport, checkWarehouseDetailPrint } from '@/api/checkWarehouse'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, ProductType, printModal },
|
|
components: { STable, VSelect, ProductType, printModal },
|
|
@@ -404,7 +405,8 @@ export default {
|
|
reader.readAsText(res)
|
|
reader.readAsText(res)
|
|
} else {
|
|
} else {
|
|
if (this.nowType == 'export' || this.nowType == 'typeExport') {
|
|
if (this.nowType == 'export' || this.nowType == 'typeExport') {
|
|
- this.download(res)
|
|
|
|
|
|
+ const fileName = '库存盘点' + moment().format('YYYYMMDDHHmmss')
|
|
|
|
+ downloadExcel(res, fileName)
|
|
} else {
|
|
} else {
|
|
this.print(res, objs.type)
|
|
this.print(res, objs.type)
|
|
}
|
|
}
|
|
@@ -424,18 +426,6 @@ export default {
|
|
window.frames['printficm'].print()
|
|
window.frames['printficm'].print()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- download (data) {
|
|
|
|
- if (!data) { return }
|
|
|
|
- const url = window.URL.createObjectURL(new Blob([data]))
|
|
|
|
- const link = document.createElement('a')
|
|
|
|
- link.style.display = 'none'
|
|
|
|
- link.href = url
|
|
|
|
- const a = moment().format('YYYYMMDDHHmmss')
|
|
|
|
- const fname = '库存盘点' + a
|
|
|
|
- link.setAttribute('download', fname + '.xlsx')
|
|
|
|
- document.body.appendChild(link)
|
|
|
|
- link.click()
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|