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
96a6f5fb
Commit
96a6f5fb
authored
Oct 12, 2021
by
季圣华
Browse files
优化供应商导出功能
parent
ed58d997
Changes
6
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/system/CustomerList.vue
View file @
96a6f5fb
...
...
@@ -43,7 +43,7 @@
<a-button
type=
"primary"
icon=
"import"
>
导入
</a-button>
</a-popover>
</a-upload>
<a-button
type=
"primary"
icon=
"download"
@
click=
"handleExportXls('客户信息')
"
>
导出
</a-button>
<a-button
type=
"primary"
@
click=
"exportExcel"
icon=
"download
"
>
导出
</a-button>
<a-dropdown>
<a-menu
slot=
"overlay"
>
<a-menu-item
key=
"1"
v-if=
"btnEnableList.indexOf(1)>-1"
@
click=
"batchDel"
><a-icon
type=
"delete"
/>
删除
</a-menu-item>
...
...
@@ -93,6 +93,7 @@
<
script
>
import
CustomerModal
from
'
./modules/CustomerModal
'
import
{
JeecgListMixin
}
from
'
@/mixins/JeecgListMixin
'
import
{
openDownloadDialog
,
sheet2blob
}
from
"
@/utils/util
"
import
JDate
from
'
@/components/jeecg/JDate
'
export
default
{
name
:
"
CustomerList
"
,
...
...
@@ -117,6 +118,9 @@
telephone
:
''
,
phonenum
:
''
},
ipagination
:{
pageSizeOptions
:
[
'
10
'
,
'
20
'
,
'
30
'
,
'
100
'
,
'
200
'
]
},
// 表头
columns
:
[
{
...
...
@@ -133,6 +137,7 @@
{
title
:
'
联系人
'
,
dataIndex
:
'
contacts
'
,
width
:
70
,
align
:
"
center
"
},
{
title
:
'
手机号码
'
,
dataIndex
:
'
telephone
'
,
width
:
100
,
align
:
"
center
"
},
{
title
:
'
联系电话
'
,
dataIndex
:
'
phoneNum
'
,
width
:
100
,
align
:
"
center
"
},
{
title
:
'
电子邮箱
'
,
dataIndex
:
'
email
'
,
width
:
150
,
align
:
"
center
"
},
{
title
:
'
期初应收
'
,
dataIndex
:
'
beginNeedGet
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
期末应收
'
,
dataIndex
:
'
allNeedGet
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
税率(%)
'
,
dataIndex
:
'
taxRate
'
,
width
:
80
,
align
:
"
center
"
},
...
...
@@ -152,7 +157,6 @@
delete
:
"
/supplier/delete
"
,
deleteBatch
:
"
/supplier/deleteBatch
"
,
importExcelUrl
:
"
/supplier/importExcel
"
,
exportXlsUrl
:
"
/supplier/exportExcel
"
,
batchSetStatusUrl
:
"
/supplier/batchSetStatus
"
}
}
...
...
@@ -176,6 +180,15 @@
if
(
this
.
btnEnableList
.
indexOf
(
1
)
===-
1
)
{
this
.
$refs
.
modalForm
.
isReadOnly
=
true
}
},
exportExcel
()
{
let
aoa
=
[[
'
名称
'
,
'
联系人
'
,
'
手机号码
'
,
'
联系电话
'
,
'
电子邮箱
'
,
'
期初应付
'
,
'
期末应付
'
,
'
税率(%)
'
]]
for
(
let
i
=
0
;
i
<
this
.
dataSource
.
length
;
i
++
)
{
let
ds
=
this
.
dataSource
[
i
]
let
item
=
[
ds
.
supplier
,
ds
.
contacts
,
ds
.
telephone
,
ds
.
phoneNum
,
ds
.
email
,
ds
.
beginNeedPay
,
ds
.
allNeedPay
,
ds
.
taxRate
]
aoa
.
push
(
item
)
}
openDownloadDialog
(
sheet2blob
(
aoa
),
'
客户信息
'
)
}
}
}
...
...
jshERP-web/src/views/system/MemberList.vue
View file @
96a6f5fb
...
...
@@ -42,7 +42,7 @@
<a-button
type=
"primary"
icon=
"import"
>
导入
</a-button>
</a-popover>
</a-upload>
<a-button
type=
"primary"
icon=
"download"
@
click=
"handleExportXls('会员信息')
"
>
导出
</a-button>
<a-button
type=
"primary"
@
click=
"exportExcel"
icon=
"download
"
>
导出
</a-button>
<a-dropdown>
<a-menu
slot=
"overlay"
>
<a-menu-item
key=
"1"
v-if=
"btnEnableList.indexOf(1)>-1"
@
click=
"batchDel"
><a-icon
type=
"delete"
/>
删除
</a-menu-item>
...
...
@@ -92,6 +92,7 @@
<
script
>
import
MemberModal
from
'
./modules/MemberModal
'
import
{
JeecgListMixin
}
from
'
@/mixins/JeecgListMixin
'
import
{
openDownloadDialog
,
sheet2blob
}
from
"
@/utils/util
"
import
JDate
from
'
@/components/jeecg/JDate
'
export
default
{
name
:
"
MemberList
"
,
...
...
@@ -116,6 +117,9 @@
telephone
:
''
,
phonenum
:
''
},
ipagination
:{
pageSizeOptions
:
[
'
10
'
,
'
20
'
,
'
30
'
,
'
100
'
,
'
200
'
]
},
// 表头
columns
:
[
{
...
...
@@ -130,8 +134,9 @@
},
{
title
:
'
名称
'
,
dataIndex
:
'
supplier
'
,
width
:
150
},
{
title
:
'
联系人
'
,
dataIndex
:
'
contacts
'
,
width
:
70
,
align
:
"
center
"
},
{
title
:
'
手机号码
'
,
dataIndex
:
'
telephone
'
,
width
:
1
1
0
,
align
:
"
center
"
},
{
title
:
'
手机号码
'
,
dataIndex
:
'
telephone
'
,
width
:
1
0
0
,
align
:
"
center
"
},
{
title
:
'
联系电话
'
,
dataIndex
:
'
phoneNum
'
,
width
:
100
,
align
:
"
center
"
},
{
title
:
'
电子邮箱
'
,
dataIndex
:
'
email
'
,
width
:
150
,
align
:
"
center
"
},
{
title
:
'
预付款
'
,
dataIndex
:
'
advanceIn
'
,
width
:
70
,
align
:
"
center
"
},
{
title
:
'
状态
'
,
dataIndex
:
'
enabled
'
,
width
:
70
,
align
:
"
center
"
,
scopedSlots
:
{
customRender
:
'
customRenderFlag
'
}
...
...
@@ -149,7 +154,6 @@
delete
:
"
/supplier/delete
"
,
deleteBatch
:
"
/supplier/deleteBatch
"
,
importExcelUrl
:
"
/supplier/importExcel
"
,
exportXlsUrl
:
"
/supplier/exportExcel
"
,
batchSetStatusUrl
:
"
/supplier/batchSetStatus
"
}
}
...
...
@@ -173,6 +177,15 @@
if
(
this
.
btnEnableList
.
indexOf
(
1
)
===-
1
)
{
this
.
$refs
.
modalForm
.
isReadOnly
=
true
}
},
exportExcel
()
{
let
aoa
=
[[
'
名称
'
,
'
联系人
'
,
'
手机号码
'
,
'
联系电话
'
,
'
电子邮箱
'
,
'
预付款
'
]]
for
(
let
i
=
0
;
i
<
this
.
dataSource
.
length
;
i
++
)
{
let
ds
=
this
.
dataSource
[
i
]
let
item
=
[
ds
.
supplier
,
ds
.
contacts
,
ds
.
telephone
,
ds
.
phoneNum
,
ds
.
email
,
ds
.
advanceIn
]
aoa
.
push
(
item
)
}
openDownloadDialog
(
sheet2blob
(
aoa
),
'
会员信息
'
)
}
}
}
...
...
jshERP-web/src/views/system/VendorList.vue
View file @
96a6f5fb
...
...
@@ -42,7 +42,7 @@
<a-button
type=
"primary"
icon=
"import"
>
导入
</a-button>
</a-popover>
</a-upload>
<a-button
type=
"primary"
icon=
"download"
@
click=
"handleExportXls('供应商信息')
"
>
导出
</a-button>
<a-button
type=
"primary"
@
click=
"exportExcel"
icon=
"download
"
>
导出
</a-button>
<a-dropdown>
<a-menu
slot=
"overlay"
>
<a-menu-item
key=
"1"
v-if=
"btnEnableList.indexOf(1)>-1"
@
click=
"batchDel"
><a-icon
type=
"delete"
/>
删除
</a-menu-item>
...
...
@@ -92,6 +92,7 @@
<
script
>
import
VendorModal
from
'
./modules/VendorModal
'
import
{
JeecgListMixin
}
from
'
@/mixins/JeecgListMixin
'
import
{
openDownloadDialog
,
sheet2blob
}
from
"
@/utils/util
"
import
JDate
from
'
@/components/jeecg/JDate
'
export
default
{
name
:
"
VendorList
"
,
...
...
@@ -116,6 +117,9 @@
telephone
:
''
,
phonenum
:
''
},
ipagination
:{
pageSizeOptions
:
[
'
10
'
,
'
20
'
,
'
30
'
,
'
100
'
,
'
200
'
]
},
// 表头
columns
:
[
{
...
...
@@ -130,8 +134,9 @@
},
{
title
:
'
名称
'
,
dataIndex
:
'
supplier
'
,
width
:
150
},
{
title
:
'
联系人
'
,
dataIndex
:
'
contacts
'
,
width
:
70
,
align
:
"
center
"
},
{
title
:
'
手机号码
'
,
dataIndex
:
'
telephone
'
,
width
:
1
1
0
,
align
:
"
center
"
},
{
title
:
'
手机号码
'
,
dataIndex
:
'
telephone
'
,
width
:
1
0
0
,
align
:
"
center
"
},
{
title
:
'
联系电话
'
,
dataIndex
:
'
phoneNum
'
,
width
:
100
,
align
:
"
center
"
},
{
title
:
'
电子邮箱
'
,
dataIndex
:
'
email
'
,
width
:
150
,
align
:
"
center
"
},
{
title
:
'
期初应付
'
,
dataIndex
:
'
beginNeedPay
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
期末应付
'
,
dataIndex
:
'
allNeedPay
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
税率(%)
'
,
dataIndex
:
'
taxRate
'
,
width
:
80
,
align
:
"
center
"
},
...
...
@@ -151,7 +156,6 @@
delete
:
"
/supplier/delete
"
,
deleteBatch
:
"
/supplier/deleteBatch
"
,
importExcelUrl
:
"
/supplier/importExcel
"
,
exportXlsUrl
:
"
/supplier/exportExcel
"
,
batchSetStatusUrl
:
"
/supplier/batchSetStatus
"
}
}
...
...
@@ -175,6 +179,15 @@
if
(
this
.
btnEnableList
.
indexOf
(
1
)
===-
1
)
{
this
.
$refs
.
modalForm
.
isReadOnly
=
true
}
},
exportExcel
()
{
let
aoa
=
[[
'
名称
'
,
'
联系人
'
,
'
手机号码
'
,
'
联系电话
'
,
'
电子邮箱
'
,
'
期初应付
'
,
'
期末应付
'
,
'
税率(%)
'
]]
for
(
let
i
=
0
;
i
<
this
.
dataSource
.
length
;
i
++
)
{
let
ds
=
this
.
dataSource
[
i
]
let
item
=
[
ds
.
supplier
,
ds
.
contacts
,
ds
.
telephone
,
ds
.
phoneNum
,
ds
.
email
,
ds
.
beginNeedPay
,
ds
.
allNeedPay
,
ds
.
taxRate
]
aoa
.
push
(
item
)
}
openDownloadDialog
(
sheet2blob
(
aoa
),
'
供应商信息
'
)
}
}
}
...
...
jshERP-web/src/views/system/modules/CustomerModal.vue
View file @
96a6f5fb
...
...
@@ -32,13 +32,13 @@
</a-form-item>
</a-col>
<a-col
:span=
"24/2"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"
电子邮箱
"
>
<a-input
placeholder=
"请输入
电子邮箱
"
v-decorator.trim=
"[ '
email
' ]"
/>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"
联系电话
"
>
<a-input
placeholder=
"请输入
联系电话
"
v-decorator.trim=
"[ '
phoneNum
' ]"
/>
</a-form-item>
</a-col>
<a-col
:span=
"24/2"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"
联系电话
"
>
<a-input
placeholder=
"请输入
联系电话
"
v-decorator.trim=
"[ '
phoneNum
' ]"
/>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"
电子邮箱
"
>
<a-input
placeholder=
"请输入
电子邮箱
"
v-decorator.trim=
"[ '
email
' ]"
/>
</a-form-item>
</a-col>
<a-col
:span=
"24/2"
>
...
...
jshERP-web/src/views/system/modules/MemberModal.vue
View file @
96a6f5fb
...
...
@@ -32,13 +32,13 @@
</a-form-item>
</a-col>
<a-col
:span=
"24/2"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"
电子邮箱
"
>
<a-input
placeholder=
"请输入
电子邮箱
"
v-decorator.trim=
"[ '
email
' ]"
/>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"
联系电话
"
>
<a-input
placeholder=
"请输入
联系电话
"
v-decorator.trim=
"[ '
phoneNum
' ]"
/>
</a-form-item>
</a-col>
<a-col
:span=
"24/2"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"
联系电话
"
>
<a-input
placeholder=
"请输入
联系电话
"
v-decorator.trim=
"[ '
phoneNum
' ]"
/>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"
电子邮箱
"
>
<a-input
placeholder=
"请输入
电子邮箱
"
v-decorator.trim=
"[ '
email
' ]"
/>
</a-form-item>
</a-col>
<a-col
:span=
"24/2"
>
...
...
jshERP-web/src/views/system/modules/VendorModal.vue
View file @
96a6f5fb
...
...
@@ -32,13 +32,13 @@
</a-form-item>
</a-col>
<a-col
:span=
"24/2"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"
电子邮箱
"
>
<a-input
placeholder=
"请输入
电子邮箱
"
v-decorator.trim=
"[ '
email
' ]"
/>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"
联系电话
"
>
<a-input
placeholder=
"请输入
联系电话
"
v-decorator.trim=
"[ '
phoneNum
' ]"
/>
</a-form-item>
</a-col>
<a-col
:span=
"24/2"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"
联系电话
"
>
<a-input
placeholder=
"请输入
联系电话
"
v-decorator.trim=
"[ '
phoneNum
' ]"
/>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"
电子邮箱
"
>
<a-input
placeholder=
"请输入
电子邮箱
"
v-decorator.trim=
"[ '
email
' ]"
/>
</a-form-item>
</a-col>
<a-col
:span=
"24/2"
>
...
...
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