Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
c75e2224
Commit
c75e2224
authored
Oct 19, 2022
by
季圣华
Browse files
给采购订单和销售订单增加excel导出
parent
3cce6124
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/bill/dialog/BillDetail.vue
View file @
c75e2224
...
...
@@ -26,6 +26,8 @@
<a-button
v-if=
"billType === '组装单'"
v-print=
"'#assemblePrint'"
>
普通打印
</a-button>
<a-button
v-if=
"billType === '拆卸单'"
v-print=
"'#disassemblePrint'"
>
普通打印
</a-button>
<a-button
v-if=
"billType === '盘点复盘'"
v-print=
"'#stockCheckReplayPrint'"
>
普通打印
</a-button>
<!--导出Excel-->
<a-button
v-if=
"billType === '采购订单'||billType === '销售订单'"
@
click=
"exportExcel()"
>
导出
</a-button>
<a-button
key=
"back"
@
click=
"handleCancel"
>
取消
</a-button>
</
template
>
<a-form
:form=
"form"
>
...
...
@@ -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
)
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment