给单据中移除原来的excel导出逻辑
This commit is contained in:
parent
71e10b9fcb
commit
b1d4265bdc
19
jshERP-web/package-lock.json
generated
19
jshERP-web/package-lock.json
generated
@ -18129,25 +18129,6 @@
|
||||
"async-limiter": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"xlsx": {
|
||||
"version": "0.14.5",
|
||||
"requires": {
|
||||
"adler-32": "~1.2.0",
|
||||
"cfb": "^1.1.2",
|
||||
"codepage": "~1.14.0",
|
||||
"commander": "~2.17.1",
|
||||
"crc-32": "~1.2.0",
|
||||
"exit-on-epipe": "~1.0.1",
|
||||
"ssf": "~0.10.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "2.17.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
|
||||
"integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"xtend": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
|
||||
@ -36,8 +36,7 @@
|
||||
"vue-router": "^3.0.1",
|
||||
"vue-splitpane": "^1.0.4",
|
||||
"vuedraggable": "^2.20.0",
|
||||
"vuex": "^3.1.0",
|
||||
"xlsx": "^0.14.3"
|
||||
"vuex": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/polyfill": "^7.2.5",
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { isURL } from '@/utils/validate'
|
||||
import XLSX from 'xlsx'
|
||||
import { downFilePost} from '@/api/manage'
|
||||
import Vue from 'vue'
|
||||
import introJs from 'intro.js'
|
||||
|
||||
@ -585,58 +585,32 @@ export function changeListFmtMinus(str) {
|
||||
return newArr;
|
||||
}
|
||||
|
||||
/**
|
||||
通用的打开下载对话框方法,没有测试过具体兼容性
|
||||
@param url 下载地址,也可以是一个blob对象,必选
|
||||
@param saveName 保存文件名,可选
|
||||
*/
|
||||
export function openDownloadDialog (url, saveName) {
|
||||
if (typeof url === 'object' && url instanceof Blob) {
|
||||
url = URL.createObjectURL(url) // 创建blob地址
|
||||
//通过post方式导出Excel
|
||||
export function exportXlsPost(fileName, title, head, tip, list) {
|
||||
if(!fileName || typeof fileName != "string"){
|
||||
fileName = "导出文件"
|
||||
}
|
||||
let aLink = document.createElement('a')
|
||||
aLink.href = url
|
||||
saveName = saveName + '_' + getNowFormatStr() + '.xls'
|
||||
aLink.download = saveName || '' // HTML5新增的属性,指定保存文件名,可以不要后缀,注意,file:///模式下不会生效
|
||||
let event
|
||||
if (window.MouseEvent) event = new MouseEvent('click')
|
||||
else {
|
||||
event = document.createEvent('MouseEvents')
|
||||
event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null)
|
||||
let paramObj = {'title': title, 'head': head, 'tip': tip, 'list': list}
|
||||
console.log("导出参数", paramObj)
|
||||
downFilePost(paramObj).then((data)=>{
|
||||
if (!data) {
|
||||
this.$message.warning("文件下载失败")
|
||||
return
|
||||
}
|
||||
aLink.dispatchEvent(event)
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
|
||||
}else{
|
||||
let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
|
||||
let link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = url
|
||||
link.setAttribute('download', fileName + '_' + getNowFormatStr()+'.xls')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link); //下载完成移除元素
|
||||
window.URL.revokeObjectURL(url); //释放掉blob对象
|
||||
}
|
||||
|
||||
/**
|
||||
* 将一个sheet转成最终的excel文件的blob对象,然后利用URL.createObjectURL下载
|
||||
* @param sheet
|
||||
* @param sheetName
|
||||
* @returns {Blob}
|
||||
*/
|
||||
export function sheet2blob (aoa, sheetName) {
|
||||
let sheet = XLSX.utils.aoa_to_sheet(aoa)
|
||||
sheetName = sheetName || 'sheet1'
|
||||
let workbook = {
|
||||
SheetNames: [sheetName],
|
||||
Sheets: {}
|
||||
}
|
||||
workbook.Sheets[sheetName] = sheet
|
||||
// 生成excel的配置项
|
||||
let wopts = {
|
||||
bookType: 'xls', // 要生成的文件类型
|
||||
bookSST: false, // 是否生成Shared String Table,官方解释是,如果开启生成速度会下降,但在低版本IOS设备上有更好的兼容性
|
||||
type: 'binary'
|
||||
}
|
||||
let wbout = XLSX.write(workbook, wopts)
|
||||
let blob = new Blob([s2ab(wbout)], { type: 'application/octet-stream' })
|
||||
// 字符串转ArrayBuffer
|
||||
function s2ab (s) {
|
||||
let buf = new ArrayBuffer(s.length)
|
||||
let view = new Uint8Array(buf)
|
||||
for (let i = 0; i != s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF
|
||||
return buf
|
||||
}
|
||||
return blob
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1127,7 +1127,7 @@
|
||||
import pick from 'lodash.pick'
|
||||
import { getAction, postAction, getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { findBillDetailByNumber, findFinancialDetailByNumber, getPlatformConfigByKey, getCurrentSystemConfig} from '@/api/api'
|
||||
import { getMpListShort, getCheckFlag, openDownloadDialog, sheet2blob } from "@/utils/util"
|
||||
import { getMpListShort, getCheckFlag, exportXlsPost } from "@/utils/util"
|
||||
import BillPrintIframe from './BillPrintIframe'
|
||||
import FinancialDetail from '../../financial/dialog/FinancialDetail'
|
||||
import JUpload from '@/components/jeecg/JUpload'
|
||||
@ -1747,21 +1747,22 @@
|
||||
},
|
||||
//零售出库|零售退货入库
|
||||
retailExportExcel() {
|
||||
let aoa = []
|
||||
aoa = [['会员卡号:', this.model.organName, '', '单据日期:', this.model.operTimeStr, '', '单据编号:', this.model.number],[]]
|
||||
let title = ['仓库名称', '条码', '名称', '规格', '型号', '颜色', '扩展信息', '库存', '单位', '序列号', '批号', '有效期', '多属性', '数量', '单价', '金额', '备注']
|
||||
aoa.push(title)
|
||||
let list = []
|
||||
let head = '仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,单位,序列号,批号,有效期,多属性,数量,单价,金额,备注'
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
let item = []
|
||||
let ds = this.dataSource[i]
|
||||
let item = [ds.depotName, ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.stock, ds.unit,
|
||||
ds.snList, ds.batchNumber, ds.expirationDate, ds.sku, ds.operNumber, ds.unitPrice, ds.allPrice, ds.remark]
|
||||
aoa.push(item)
|
||||
item.push(ds.depotName, ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.stock, ds.unit,
|
||||
ds.snList, ds.batchNumber, ds.expirationDate, ds.sku, ds.operNumber, ds.unitPrice, ds.allPrice, ds.remark)
|
||||
list.push(item)
|
||||
}
|
||||
openDownloadDialog(sheet2blob(aoa), this.billType + '_' + this.model.number)
|
||||
let organName = this.model.organName? '会员卡号' + this.model.organName: ''
|
||||
let tip = organName + ' ' + '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
|
||||
exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
|
||||
},
|
||||
//采购订单|销售订单
|
||||
orderExportExcel() {
|
||||
let aoa = []
|
||||
let list = []
|
||||
let finishType = ''
|
||||
let organType = ''
|
||||
if(this.billType === '采购订单') {
|
||||
@ -1771,98 +1772,104 @@
|
||||
finishType = '已出库'
|
||||
organType = '客户:'
|
||||
}
|
||||
aoa = [[organType, this.model.organName, '', '单据日期:', this.model.operTimeStr, '', '单据编号:', this.model.number],[]]
|
||||
let title = ['条码', '名称', '规格', '型号', '颜色', '扩展信息', '库存', '单位', '多属性', '数量', finishType, '单价', '金额', '税率(%)', '税额', '价税合计', '备注']
|
||||
aoa.push(title)
|
||||
let head = '条码,名称,规格,型号,颜色,扩展信息,库存,单位,多属性,数量,' + finishType + ',单价,金额,税率(%),税额,价税合计,备注'
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
let item = []
|
||||
let ds = this.dataSource[i]
|
||||
let item = [ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.stock, ds.unit, ds.sku,
|
||||
ds.operNumber, ds.finishNumber, ds.unitPrice, ds.allPrice, ds.taxRate, ds.taxMoney, ds.taxLastMoney, ds.remark]
|
||||
aoa.push(item)
|
||||
item.push(ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.stock, ds.unit, ds.sku,
|
||||
ds.operNumber, ds.finishNumber, ds.unitPrice, ds.allPrice, ds.taxRate, ds.taxMoney, ds.taxLastMoney, ds.remark)
|
||||
list.push(item)
|
||||
}
|
||||
openDownloadDialog(sheet2blob(aoa), this.billType + '_' + this.model.number)
|
||||
let organName = this.model.organName? this.model.organName: ''
|
||||
let tip = organType + organName + ' ' + '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
|
||||
exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
|
||||
},
|
||||
//采购入库|采购退货出库|销售出库|销售退货入库
|
||||
purchaseSaleExportExcel() {
|
||||
let aoa = []
|
||||
let list = []
|
||||
let organType = ''
|
||||
if(this.billType === '采购入库' || this.billType === '采购退货出库') {
|
||||
organType = '供应商:'
|
||||
} else if(this.billType === '销售出库' || this.billType === '销售退货入库') {
|
||||
organType = '客户:'
|
||||
}
|
||||
aoa = [[organType, this.model.organName, '', '单据日期:', this.model.operTimeStr, '', '单据编号:', this.model.number, '', '关联单号:', this.model.linkNumber],[]]
|
||||
let title = ['仓库名称', '条码', '名称', '规格', '型号', '颜色', '扩展信息', '库存', '单位', '序列号', '批号', '有效期', '多属性', '数量', '单价', '金额', '税率(%)', '税额', '价税合计', '重量', '备注']
|
||||
aoa.push(title)
|
||||
let head = '仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,单位,序列号,批号,有效期,多属性,数量,单价,金额,税率(%),税额,价税合计,重量,备注'
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
let item = []
|
||||
let ds = this.dataSource[i]
|
||||
let item = [ds.depotName, ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.stock, ds.unit,
|
||||
ds.snList, ds.batchNumber, ds.expirationDate, ds.sku, ds.operNumber, ds.unitPrice, ds.allPrice, ds.taxRate, ds.taxMoney, ds.taxLastMoney, ds.weight, ds.remark]
|
||||
aoa.push(item)
|
||||
item.push(ds.depotName, ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.stock, ds.unit,
|
||||
ds.snList, ds.batchNumber, ds.expirationDate, ds.sku, ds.operNumber, ds.unitPrice, ds.allPrice, ds.taxRate, ds.taxMoney, ds.taxLastMoney, ds.weight, ds.remark)
|
||||
list.push(item)
|
||||
}
|
||||
openDownloadDialog(sheet2blob(aoa), this.billType + '_' + this.model.number)
|
||||
let organName = this.model.organName? this.model.organName: ''
|
||||
let linkNumber = this.model.linkNumber? this.model.linkNumber: ''
|
||||
let tip = organType + organName + ' ' + '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' +
|
||||
this.model.number + '' + '关联单号:' + linkNumber
|
||||
exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
|
||||
},
|
||||
//其它入库|其它出库
|
||||
otherExportExcel() {
|
||||
let aoa = []
|
||||
let list = []
|
||||
let organType = ''
|
||||
if(this.billType === '其它入库') {
|
||||
organType = '供应商:'
|
||||
} else if(this.billType === '其它出库') {
|
||||
organType = '客户:'
|
||||
}
|
||||
aoa = [[organType, this.model.organName, '', '单据日期:', this.model.operTimeStr, '', '单据编号:', this.model.number],[]]
|
||||
let title = ['仓库名称', '条码', '名称', '规格', '型号', '颜色', '扩展信息', '库存', '单位', '序列号', '批号', '有效期', '多属性', '数量', '单价', '金额', '备注']
|
||||
aoa.push(title)
|
||||
let head = '仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,单位,序列号,批号,有效期,多属性,数量,单价,金额,备注'
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
let item = []
|
||||
let ds = this.dataSource[i]
|
||||
let item = [ds.depotName, ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.stock, ds.unit,
|
||||
ds.snList, ds.batchNumber, ds.expirationDate, ds.sku, ds.operNumber, ds.unitPrice, ds.allPrice, ds.remark]
|
||||
aoa.push(item)
|
||||
item.push(ds.depotName, ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.stock, ds.unit,
|
||||
ds.snList, ds.batchNumber, ds.expirationDate, ds.sku, ds.operNumber, ds.unitPrice, ds.allPrice, ds.remark)
|
||||
list.push(item)
|
||||
}
|
||||
openDownloadDialog(sheet2blob(aoa), this.billType + '_' + this.model.number)
|
||||
let organName = this.model.organName? this.model.organName: ''
|
||||
let tip = organType + organName + ' ' + '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
|
||||
exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
|
||||
},
|
||||
//调拨出库
|
||||
allocationOutExportExcel() {
|
||||
let aoa = []
|
||||
aoa = [['单据日期:', this.model.operTimeStr, '', '单据编号:', this.model.number],[]]
|
||||
let title = ['仓库名称', '条码', '名称', '规格', '型号', '颜色', '扩展信息', '库存', '调入仓库', '单位', '多属性', '数量', '单价', '金额', '备注']
|
||||
aoa.push(title)
|
||||
let list = []
|
||||
let head = '仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,调入仓库,单位,多属性,数量,单价,金额,备注'
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
let item = []
|
||||
let ds = this.dataSource[i]
|
||||
let item = [ds.depotName, ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.stock, ds.anotherDepotName, ds.unit,
|
||||
ds.sku, ds.operNumber, ds.unitPrice, ds.allPrice, ds.remark]
|
||||
aoa.push(item)
|
||||
item.push(ds.depotName, ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.stock, ds.anotherDepotName, ds.unit,
|
||||
ds.sku, ds.operNumber, ds.unitPrice, ds.allPrice, ds.remark)
|
||||
list.push(item)
|
||||
}
|
||||
openDownloadDialog(sheet2blob(aoa), this.billType + '_' + this.model.number)
|
||||
let tip = '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
|
||||
exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
|
||||
},
|
||||
//组装单|拆卸单
|
||||
assembleExportExcel() {
|
||||
let aoa = []
|
||||
aoa = [['单据日期:', this.model.operTimeStr, '', '单据编号:', this.model.number],[]]
|
||||
let title = ['商品类型', '仓库名称', '条码', '名称', '规格', '型号', '颜色', '扩展信息', '库存', '单位', '多属性', '数量', '单价', '金额', '备注']
|
||||
aoa.push(title)
|
||||
let list = []
|
||||
let head = ['商品类型,仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,单位,多属性,数量,单价,金额,备注']
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
let item = []
|
||||
let ds = this.dataSource[i]
|
||||
let item = [ds.mType, ds.depotName, ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.stock, ds.unit,
|
||||
ds.sku, ds.operNumber, ds.unitPrice, ds.allPrice, ds.remark]
|
||||
aoa.push(item)
|
||||
item.push(ds.mType, ds.depotName, ds.barCode, ds.name, ds.standard, ds.model, ds.color, ds.materialOther, ds.stock, ds.unit,
|
||||
ds.sku, ds.operNumber, ds.unitPrice, ds.allPrice, ds.remark)
|
||||
list.push(item)
|
||||
}
|
||||
openDownloadDialog(sheet2blob(aoa), this.billType + '_' + this.model.number)
|
||||
let tip = '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
|
||||
exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
|
||||
},
|
||||
//盘点复盘
|
||||
stockCheckReplayExportExcel() {
|
||||
let aoa = []
|
||||
aoa = [['单据日期:', this.model.operTimeStr, '', '单据编号:', this.model.number, '', '关联单据:', this.model.linkNumber],[]]
|
||||
let title = ['仓库名称', '条码', '名称', '规格', '型号', '扩展信息', '库存', '单位', '多属性', '数量', '单价', '金额', '备注']
|
||||
aoa.push(title)
|
||||
let list = []
|
||||
let head = '仓库名称,条码,名称,规格,型号,扩展信息,库存,单位,多属性,数量,单价,金额,备注'
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
let item = []
|
||||
let ds = this.dataSource[i]
|
||||
let item = [ds.depotName, ds.barCode, ds.name, ds.standard, ds.model, ds.materialOther, ds.stock, ds.unit,
|
||||
ds.sku, ds.operNumber, ds.unitPrice, ds.allPrice, ds.remark]
|
||||
aoa.push(item)
|
||||
item.push(ds.depotName, ds.barCode, ds.name, ds.standard, ds.model, ds.materialOther, ds.stock, ds.unit,
|
||||
ds.sku, ds.operNumber, ds.unitPrice, ds.allPrice, ds.remark)
|
||||
list.push(item)
|
||||
}
|
||||
openDownloadDialog(sheet2blob(aoa), this.billType + '_' + this.model.number)
|
||||
let linkNumber = this.model.linkNumber? this.model.linkNumber: ''
|
||||
let tip = '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number + '' + '关联单号:' + linkNumber
|
||||
exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@
|
||||
<script>
|
||||
import BillDetail from '../bill/dialog/BillDetail'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getNowFormatYear, openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { getNowFormatYear } from "@/utils/util"
|
||||
import {getAction} from '@/api/manage'
|
||||
import {findBySelectSup, findBillDetailByNumber, getAllOrganizationTreeByUser} from '@/api/api'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getNowFormatYear, getMpListShort, openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { getNowFormatYear, getMpListShort } from "@/utils/util"
|
||||
import {getAction} from '@/api/manage'
|
||||
import {findBySelectSup, getAllOrganizationTreeByUser} from '@/api/api'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
<script>
|
||||
import DebtAccountList from './modules/DebtAccountList'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getNowFormatYear, openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { getNowFormatYear } from "@/utils/util"
|
||||
import { getAction } from '@/api/manage'
|
||||
import {findBySelectCus} from '@/api/api'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
|
||||
@ -136,7 +136,7 @@
|
||||
<script>
|
||||
import BillDetail from '../bill/dialog/BillDetail'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getNowFormatYear, openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { getNowFormatYear } from "@/utils/util"
|
||||
import {getAction} from '@/api/manage'
|
||||
import {findBySelectOrgan, findBillDetailByNumber, getUserList, getAllOrganizationTreeByUser} from '@/api/api'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getNowFormatYear, openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { getNowFormatYear } from "@/utils/util"
|
||||
import {getAction} from '@/api/manage'
|
||||
import {findBySelectOrgan, getAllOrganizationTreeByUser} from '@/api/api'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getAction } from '@/api/manage'
|
||||
import {queryMaterialCategoryTreeList} from '@/api/api'
|
||||
import { getMpListShort, openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { getMpListShort } from "@/utils/util"
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
import moment from 'moment'
|
||||
import Vue from 'vue'
|
||||
|
||||
@ -136,7 +136,7 @@
|
||||
<script>
|
||||
import BillDetail from '../bill/dialog/BillDetail'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getNowFormatYear, openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { getNowFormatYear } from "@/utils/util"
|
||||
import {getAction} from '@/api/manage'
|
||||
import {findBySelectOrgan, findBillDetailByNumber, getUserList, getAllOrganizationTreeByUser} from '@/api/api'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getNowFormatYear, openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { getNowFormatYear } from "@/utils/util"
|
||||
import {getAction} from '@/api/manage'
|
||||
import {findBySelectOrgan, getAllOrganizationTreeByUser} from '@/api/api'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getNowFormatYear, getMpListShort, openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { getNowFormatYear, getMpListShort } from "@/utils/util"
|
||||
import {getAction} from '@/api/manage'
|
||||
import {findBySelectRetail, getAllOrganizationTreeByUser} from '@/api/api'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getNowFormatYear, getMpListShort, openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { getNowFormatYear, getMpListShort } from "@/utils/util"
|
||||
import {getAction} from '@/api/manage'
|
||||
import {findBySelectCus, getAllOrganizationTreeByUser} from '@/api/api'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
import {getAction} from '@/api/manage'
|
||||
import { getMpListShort, openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { getMpListShort } from "@/utils/util"
|
||||
import Vue from 'vue'
|
||||
export default {
|
||||
name: "StockWarningReport",
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
<script>
|
||||
import DebtAccountList from './modules/DebtAccountList'
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import { getNowFormatYear, openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { getNowFormatYear } from "@/utils/util"
|
||||
import { getAction } from '@/api/manage'
|
||||
import {findBySelectSup} from '@/api/api'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
|
||||
@ -71,7 +71,6 @@
|
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||
import JEllipsis from '@/components/jeecg/JEllipsis'
|
||||
import { findBillDetailByNumber } from '@/api/api'
|
||||
import { openDownloadDialog, sheet2blob} from "@/utils/util"
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
|
||||
export default {
|
||||
@ -181,13 +180,16 @@
|
||||
})
|
||||
},
|
||||
exportExcel() {
|
||||
let aoa = [['单据编号', '类型', '条码', '名称', '仓库名称', '数量', '日期']]
|
||||
let list = []
|
||||
let head = '单据编号,类型,条码,名称,仓库名称,数量,日期'
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
let item = []
|
||||
let ds = this.dataSource[i]
|
||||
let item = [ds.number, ds.type, ds.barCode, ds.materialName, ds.depotName, ds.basicNumber, ds.operTime]
|
||||
aoa.push(item)
|
||||
item.push(ds.number, ds.type, ds.barCode, ds.materialName, ds.depotName, ds.basicNumber, ds.operTime)
|
||||
list.push(item)
|
||||
}
|
||||
openDownloadDialog(sheet2blob(aoa), '商品库存流水')
|
||||
let tip = '商品库存流水查询'
|
||||
this.handleExportXlsPost('商品库存流水', '商品库存流水', head, tip, list)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1470,21 +1470,6 @@ adjust-sourcemap-loader@^1.1.0:
|
||||
object-path "^0.9.2"
|
||||
regex-parser "^2.2.9"
|
||||
|
||||
adler-32@~1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/adler-32/-/adler-32-1.2.0.tgz#6a3e6bf0a63900ba15652808cb15c6813d1a5f25"
|
||||
integrity sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=
|
||||
dependencies:
|
||||
exit-on-epipe "~1.0.1"
|
||||
printj "~1.1.0"
|
||||
|
||||
adler-32@~1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/adler-32/-/adler-32-1.3.0.tgz#3cad1b71cdfa69f6c8a91f3e3615d31a4fdedc72"
|
||||
integrity sha512-f5nltvjl+PRUh6YNfUstRaXwJxtfnKEWhAWWlmKvh+Y3J2+98a0KKVYDEhz6NdKGqswLhjNGznxfSsZGOvOd9g==
|
||||
dependencies:
|
||||
printj "~1.2.2"
|
||||
|
||||
aggregate-error@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0"
|
||||
@ -2947,15 +2932,6 @@ center-align@^0.1.1:
|
||||
align-text "^0.1.3"
|
||||
lazy-cache "^1.0.3"
|
||||
|
||||
cfb@^1.1.2:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/cfb/-/cfb-1.2.1.tgz#209429e4c68efd30641f6fc74b2d6028bd202402"
|
||||
integrity sha512-wT2ScPAFGSVy7CY+aauMezZBnNrfnaLSrxHUHdea+Td/86vrk6ZquggV+ssBR88zNs0OnBkL2+lf9q0K+zVGzQ==
|
||||
dependencies:
|
||||
adler-32 "~1.3.0"
|
||||
crc-32 "~1.2.0"
|
||||
printj "~1.3.0"
|
||||
|
||||
chalk@^1.1.1, chalk@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
|
||||
@ -3220,14 +3196,6 @@ codemirror@^5.46.0:
|
||||
resolved "https://registry.npmjs.org/codemirror/-/codemirror-5.52.0.tgz#4dbd6aef7f0e63db826b9a23922f0c03ac75c0a7"
|
||||
integrity sha512-K2UB6zjscrfME03HeRe/IuOmCeqNpw7PLKGHThYpLbZEuKf+ZoujJPhxZN4hHJS1O7QyzEsV7JJZGxuQWVaFCg==
|
||||
|
||||
codepage@~1.14.0:
|
||||
version "1.14.0"
|
||||
resolved "https://registry.yarnpkg.com/codepage/-/codepage-1.14.0.tgz#8cbe25481323559d7d307571b0fff91e7a1d2f99"
|
||||
integrity sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=
|
||||
dependencies:
|
||||
commander "~2.14.1"
|
||||
exit-on-epipe "~1.0.1"
|
||||
|
||||
collection-visit@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
|
||||
@ -3318,7 +3286,7 @@ commander@2, commander@^2.18.0, commander@^2.20.0:
|
||||
resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
|
||||
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
|
||||
|
||||
commander@2.17.x, commander@~2.17.1:
|
||||
commander@2.17.x:
|
||||
version "2.17.1"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf"
|
||||
integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==
|
||||
@ -3328,11 +3296,6 @@ commander@^4.1.1:
|
||||
resolved "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068"
|
||||
integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==
|
||||
|
||||
commander@~2.14.1:
|
||||
version "2.14.1"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa"
|
||||
integrity sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==
|
||||
|
||||
commander@~2.19.0:
|
||||
version "2.19.0"
|
||||
resolved "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
|
||||
@ -3544,14 +3507,6 @@ cosmiconfig@^5.0.0:
|
||||
js-yaml "^3.13.1"
|
||||
parse-json "^4.0.0"
|
||||
|
||||
crc-32@~1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.0.tgz#cb2db6e29b88508e32d9dd0ec1693e7b41a18208"
|
||||
integrity sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==
|
||||
dependencies:
|
||||
exit-on-epipe "~1.0.1"
|
||||
printj "~1.1.0"
|
||||
|
||||
create-ecdh@^4.0.0:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff"
|
||||
@ -5056,11 +5011,6 @@ execa@^3.3.0:
|
||||
signal-exit "^3.0.2"
|
||||
strip-final-newline "^2.0.0"
|
||||
|
||||
exit-on-epipe@~1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692"
|
||||
integrity sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==
|
||||
|
||||
expand-brackets@^2.1.4:
|
||||
version "2.1.4"
|
||||
resolved "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
|
||||
@ -5488,11 +5438,6 @@ forwarded@~0.1.2:
|
||||
resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
|
||||
integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
|
||||
|
||||
frac@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/frac/-/frac-1.1.2.tgz#3d74f7f6478c88a1b5020306d747dc6313c74d0b"
|
||||
integrity sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==
|
||||
|
||||
fragment-cache@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
|
||||
@ -9047,21 +8992,6 @@ pretty-error@^2.0.2, pretty-error@^2.1.1:
|
||||
renderkid "^2.0.1"
|
||||
utila "~0.4"
|
||||
|
||||
printj@~1.1.0:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222"
|
||||
integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==
|
||||
|
||||
printj@~1.2.2:
|
||||
version "1.2.3"
|
||||
resolved "https://registry.yarnpkg.com/printj/-/printj-1.2.3.tgz#2cfb2b192a1e5385dbbe5b46658ac34aa828508a"
|
||||
integrity sha512-sanczS6xOJOg7IKDvi4sGOUOe7c1tsEzjwlLFH/zgwx/uyImVM9/rgBkc8AfiQa/Vg54nRd8mkm9yI7WV/O+WA==
|
||||
|
||||
printj@~1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/printj/-/printj-1.3.0.tgz#9018a918a790e43707f10625d6e10187a367cff6"
|
||||
integrity sha512-017o8YIaz8gLhaNxRB9eBv2mWXI2CtzhPJALnQTP+OPpuUfP0RMWqr/mHCzqVeu1AQxfzSfAtAq66vKB8y7Lzg==
|
||||
|
||||
private@^0.1.6, private@^0.1.8:
|
||||
version "0.1.8"
|
||||
resolved "https://registry.npmjs.org/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
|
||||
@ -10212,13 +10142,6 @@ sprintf-js@~1.0.2:
|
||||
resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
|
||||
|
||||
ssf@~0.10.2:
|
||||
version "0.10.3"
|
||||
resolved "https://registry.yarnpkg.com/ssf/-/ssf-0.10.3.tgz#8eae1fc29c90a552e7921208f81892d6f77acb2b"
|
||||
integrity sha512-pRuUdW0WwyB2doSqqjWyzwCD6PkfxpHAHdZp39K3dp/Hq7f+xfMwNAWIi16DyrRg4gg9c/RvLYkJTSawTPTm1w==
|
||||
dependencies:
|
||||
frac "~1.1.2"
|
||||
|
||||
sshpk@^1.7.0:
|
||||
version "1.16.1"
|
||||
resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
|
||||
@ -11685,19 +11608,6 @@ ws@^6.0.0, ws@^6.2.1:
|
||||
dependencies:
|
||||
async-limiter "~1.0.0"
|
||||
|
||||
xlsx@^0.14.3:
|
||||
version "0.14.5"
|
||||
resolved "https://registry.yarnpkg.com/xlsx/-/xlsx-0.14.5.tgz#3637e914d791bdca7382816e173f7d725ed0e0d2"
|
||||
integrity sha512-s/5f4/mjeWREmIWZ+HtDfh/rnz51ar+dZ4LWKZU3u9VBx2zLdSIWTdXgoa52/pnZ9Oe/Vu1W1qzcKzLVe+lq4w==
|
||||
dependencies:
|
||||
adler-32 "~1.2.0"
|
||||
cfb "^1.1.2"
|
||||
codepage "~1.14.0"
|
||||
commander "~2.17.1"
|
||||
crc-32 "~1.2.0"
|
||||
exit-on-epipe "~1.0.1"
|
||||
ssf "~0.10.2"
|
||||
|
||||
xtend@^4.0.0, xtend@~4.0.1:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user