diff --git a/jshERP-web/src/views/bill/dialog/BillDetail.vue b/jshERP-web/src/views/bill/dialog/BillDetail.vue
index bb71c5e2..268ebdbe 100644
--- a/jshERP-web/src/views/bill/dialog/BillDetail.vue
+++ b/jshERP-web/src/views/bill/dialog/BillDetail.vue
@@ -26,6 +26,8 @@
普通打印
普通打印
普通打印
+
+ 导出
取消
@@ -976,7 +978,7 @@
import pick from 'lodash.pick'
import { getAction } from '@/api/manage'
import { findBillDetailByNumber, findFinancialDetailByNumber, getPlatformConfigByKey, getCurrentSystemConfig} from '@/api/api'
- import { getMpListShort } from "@/utils/util"
+ import { getMpListShort, openDownloadDialog, sheet2blob } from "@/utils/util"
import BillPrintIframe from './BillPrintIframe'
import FinancialDetail from '../../financial/dialog/FinancialDetail'
import JUpload from '@/components/jeecg/JUpload'
@@ -1498,6 +1500,29 @@
this.$refs.modalDetail.title = this.billType + "-三联打印预览";
}
})
+ },
+ exportExcel() {
+ let aoa = []
+ let finishType = ''
+ let organType = ''
+ if(this.billType === '采购订单') {
+ finishType = '已入库'
+ organType = '供应商:'
+ } else if(this.billType === '销售订单') {
+ finishType = '已出库'
+ organType = '客户:'
+ }
+ aoa = [[organType, this.model.organName, '', '单据日期:', this.model.operTimeStr, '', '单据编号:', this.model.number],[]]
+ let title = ['条码', '名称', '规格', '型号', '颜色', '扩展信息', '库存', '单位', '多属性', '数量', finishType,
+ '单价', '金额', '税率(%)', '税额', '价税合计', '备注']
+ aoa.push(title)
+ for (let i = 0; i < this.dataSource.length; i++) {
+ 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)
+ }
+ openDownloadDialog(sheet2blob(aoa), this.billType + '_' + this.model.number)
}
}
}