Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-finance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-finance
Commits
3c2cb2b2
提交
3c2cb2b2
authored
9月 09, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update: 发票管理,项目列表开发完毕
上级
509a164d
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
202 行增加
和
130 行删除
+202
-130
api.js
src/modules/invoice/api.js
+10
-0
DistributionDialog.vue
src/modules/invoice/components/DistributionDialog.vue
+25
-18
List.vue
src/modules/invoice/views/List.vue
+164
-95
List.vue
src/modules/payment/views/List.vue
+2
-0
List.vue
src/modules/project/views/List.vue
+1
-17
没有找到文件。
src/modules/invoice/api.js
浏览文件 @
3c2cb2b2
...
...
@@ -6,3 +6,13 @@ import httpRequest from '@/utils/axios'
export
function
getInvoiceList
(
params
)
{
return
httpRequest
.
get
(
'/api/finance/v1/invoices/list'
,
{
params
}).
then
({})
}
// 获取支付过滤条件
export
function
getCondition
(
params
)
{
return
httpRequest
.
get
(
'/api/finance/v1/payments/condition'
,
{
params
})
}
// 分配发票跟进人
export
function
assignSales
(
data
)
{
return
httpRequest
.
post
(
'/api/finance/v1/invoices/assign-sales'
,
data
,
{})
}
src/modules/invoice/components/DistributionDialog.vue
浏览文件 @
3c2cb2b2
<
template
>
<div>
<el-dialog
title=
"分配票据跟进人"
center
:visible
.
sync=
"visible"
:before-close=
"modalClose
"
>
<el-dialog
title=
"分配票据跟进人"
center
v-bind=
"$attrs"
v-on=
"$listeners
"
>
<el-form
:model=
"form"
>
<el-form-item
label=
"票据跟进人"
>
<el-select
v-model=
"form.region"
placeholder=
"请选择活动区域"
>
<el-option
label=
"区域一"
value=
"shanghai"
></el-option>
<el-option
label=
"区域二"
value=
"beijing"
></el-option>
<el-select
v-model=
"form.value"
placeholder=
"请选择活动区域"
>
<el-option
v-for=
"(item, index) in options"
:key=
"index"
:label=
"item.user_name"
:value=
"item.user_id"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"$emit('
dialogHide'
)"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"
$emit('dialogHide')
"
>
确 定
</el-button>
<el-button
@
click=
"$emit('
update:visible', false
)"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"
assignSales
"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
assignSales
}
from
'../api'
export
default
{
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
}
options
:
{
type
:
Array
},
invoicesIds
:
{
type
:
Array
}
},
data
()
{
return
{
form
:
{
name
:
''
,
region
:
''
,
date1
:
''
,
date2
:
''
,
delivery
:
false
,
type
:
[],
resource
:
''
,
desc
:
''
value
:
''
}
}
},
methods
:
{
modalClose
()
{
this
.
$emit
(
'update:visible'
,
false
)
},
assignSales
()
{
const
ids
=
this
.
invoicesIds
.
map
(
item
=>
item
.
id
)
const
params
=
{
invoices_id
:
ids
.
join
(
','
),
sales_rep_user_id
:
this
.
form
.
value
}
assignSales
(
params
).
then
(
res
=>
{
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
)
})
}
}
}
...
...
src/modules/invoice/views/List.vue
浏览文件 @
3c2cb2b2
<
template
>
<div>
<app-card
style=
"max-width: 100%"
>
<app-card>
<app-list
v-bind=
"tableOptions"
ref=
"list"
@
selection-change=
"handleSelectionChange"
>
<!-- 允许开具发票 -->
<template
v-slot:ticket_type=
"
{ params }">
<el-radio-group
v-model=
"params.can_add_invoice"
>
<el-radio
:label=
"1"
>
开启
</el-radio>
<el-radio
:label=
"2"
>
关闭
</el-radio>
</el-radio-group>
</
template
>
<!-- 首次缴费时间 -->
<
template
v-slot:firstDate=
"{ params }"
>
<el-date-picker
v-model=
"params.firstDate"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
size=
"small"
style=
"width: 360px"
>
</el-date-picker>
</
template
>
<!-- 末次缴费时间 -->
<
template
v-slot:lastDate=
"{ params }"
>
<el-date-picker
v-model=
"params.lastDate"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
size=
"small"
style=
"width: 360px"
>
</el-date-picker>
</
template
>
<el-row>
<el-button
type=
"primary"
@
click=
"is
ShowDialog = true
"
>
分配票据跟进人
</el-button>
<el-button
type=
"primary"
@
click=
"is
HandleSelection
"
>
分配票据跟进人
</el-button>
</el-row>
<
template
v-slot:table-x=
"{ row }"
>
<router-link
:to=
"
{ name: '
invoice
View', params: { id: row.id } }">
<router-link
:to=
"
{ name: '
payment
View', params: { id: row.id } }">
<el-button
type=
"text"
>
查看
</el-button>
</router-link>
</
template
>
<
template
#
footer
>
<span>
已选择
{{
multipleSelection
.
length
}}
条
</span>
<el-button
@
click=
"exportSelect"
style=
"margin-left: 40px"
>
导出
</el-button>
</
template
>
</app-list>
</app-card>
<distribution-dialog
@
dialogHide=
"dialogHide"
:visible
.
sync=
"isShowDialog"
></distribution-dialog>
<distribution-dialog
@
success=
"success"
:visible
.
sync=
"isShowDialog"
:options=
"conditionList.sales_rep_user_id"
:invoicesIds=
"multipleSelection"
></distribution-dialog>
</div>
</template>
...
...
@@ -22,12 +66,16 @@ import AppList from '@/components/base/AppList.vue'
import
AppCard
from
'@/components/base/AppCard.vue'
import
DistributionDialog
from
'../components/DistributionDialog.vue'
// 接口
import
{
getInvoiceList
}
from
'../api'
import
{
getInvoiceList
,
getCondition
}
from
'../api'
import
XLSX
from
'xlsx'
import
{
funDownload
}
from
'@/utils/util'
export
default
{
components
:
{
AppCard
,
AppList
,
DistributionDialog
},
data
()
{
return
{
multipleSelection
:
[],
conditionList
:
{},
invoiceColorType
:
[
{
label
:
'红字发票'
,
value
:
'1'
},
{
label
:
'蓝字发票'
,
value
:
'0'
}
...
...
@@ -37,7 +85,7 @@ export default {
{
label
:
'普通电子发票'
,
value
:
'2'
},
{
label
:
'专用纸质发票'
,
value
:
'3'
}
],
taxpayer
_t
ype
:
[
taxpayer
T
ype
:
[
{
label
:
'个人'
,
value
:
'1'
},
{
label
:
'企业'
,
value
:
'2'
},
{
label
:
'非营利性单位'
,
value
:
'3'
}
...
...
@@ -59,9 +107,22 @@ export default {
const
_this
=
this
return
{
remote
:
{
httpRequest
:
getInvoiceList
// params: { shop_id: this.shopId, spu_id: '', spu_name: '', group_id: '', price_min: '', price_max: '' }
// beforeRequest: this.beforeRequest
httpRequest
:
getInvoiceList
,
params
:
{
invoice_haoma
:
''
,
name
:
''
,
txn_id
:
''
,
invoice_type
:
''
,
invoice_color_type
:
''
,
sales_rep_user_id
:
''
,
can_add_invoice
:
''
,
firstDate
:
''
,
lastDate
:
''
},
beforeRequest
:
this
.
beforeRequest
,
callback
(
data
)
{
data
.
forEach
(
item
=>
{
// 发票类型
item
.
invoiceTypeViewName
=
_this
.
findName
(
_this
.
invoiceType
,
item
.
invoice_type
)
// 抬头类型
item
.
taxpayeTypeViewName
=
_this
.
findName
(
_this
.
taxpayerType
,
item
.
taxpayer_type
)
// 开票类型
item
.
invoiceColorTypeViewName
=
_this
.
findName
(
_this
.
invoiceColorType
,
item
.
invoice_color_type
)
// 开票状态
item
.
invoiceStatusViewName
=
_this
.
findName
(
_this
.
invoiceStatus
,
item
.
invoice_status
)
})
return
data
}
},
filters
:
[
{
type
:
'input'
,
prop
:
'invoice_haoma'
,
placeholder
:
'发票号码'
},
...
...
@@ -80,8 +141,25 @@ export default {
placeholder
:
'请选择开票类型'
}
],
moreFilters
:
[
{
prop
:
'sales_rep_user_id'
,
label
:
'跟进人'
,
type
:
'select'
,
placeholder
:
'跟进人'
,
options
:
this
.
conditionList
.
sales_rep_user_id
,
labelKey
:
'user_name'
,
valueKey
:
'user_id'
,
filterable
:
true
,
remote
:
true
},
{
label
:
'允许开具发票'
,
prop
:
'can_add_invoice'
,
slots
:
'ticket_type'
},
{
label
:
'首次缴费时间'
,
prop
:
'firstDate'
,
slots
:
'firstDate'
},
{
label
:
'末次缴费时间'
,
prop
:
'lastDate'
,
slots
:
'lastDate'
}
],
columnsOptions
:
{
key
:
'invoices'
},
columns
:
[
{
type
:
'selection'
,
minWidth
:
'50px'
,
fixed
:
'left'
},
{
label
:
'发票代码'
,
prop
:
'invoice_daima'
},
{
label
:
'发票号码'
,
prop
:
'invoice_haoma'
},
{
label
:
'客户姓名'
,
prop
:
'name'
},
...
...
@@ -94,36 +172,9 @@ export default {
{
label
:
'不含税金额'
,
prop
:
'invoice_excluding_tax_amount'
},
{
label
:
'含税金额'
,
prop
:
'invoice_total_amount'
},
{
label
:
'缴费时间'
,
prop
:
'final_payment_time'
},
{
label
:
'发票类型'
,
prop
:
'invoice_type'
,
computed
({
row
})
{
const
found
=
_this
.
invoiceType
.
find
(
item
=>
{
return
parseInt
(
item
.
value
)
===
parseInt
(
row
.
invoice_type
)
})
return
found
?
found
.
label
:
row
.
invoice_type
}
},
{
label
:
'抬头类型'
,
prop
:
'taxpayer_type'
,
computed
({
row
})
{
const
found
=
_this
.
taxpayer_type
.
find
(
item
=>
{
return
parseInt
(
item
.
value
)
===
parseInt
(
row
.
taxpayer_type
)
})
return
found
?
found
.
label
:
row
.
taxpayer_type
}
},
{
label
:
'开票类型'
,
prop
:
'invoice_color_type'
,
computed
({
row
})
{
const
found
=
_this
.
invoiceColorType
.
find
(
item
=>
{
return
parseInt
(
item
.
value
)
===
parseInt
(
row
.
invoice_color_type
)
})
return
found
?
found
.
label
:
row
.
invoice_color_type
}
},
{
label
:
'发票类型'
,
prop
:
'invoiceTypeViewName'
},
{
label
:
'抬头类型'
,
prop
:
'taxpayeTypeViewName'
},
{
label
:
'开票类型'
,
prop
:
'invoiceColorTypeViewName'
},
{
label
:
'原发票号码'
,
prop
:
'old_invoice_haoma'
},
{
label
:
'原发票代码'
,
prop
:
'old_invoice_daima'
},
{
label
:
'纳税人名称'
,
prop
:
'taxpayer_name'
},
...
...
@@ -140,76 +191,94 @@ export default {
{
label
:
'票据跟进人'
,
prop
:
'sales_rep_user_id_name'
},
{
label
:
'发票申请日期'
,
prop
:
'invoice_application_time'
},
{
label
:
'开票时间'
,
prop
:
'invoice_issuing_time'
},
{
label
:
'开票状态'
,
prop
:
'invoice_status'
,
computed
({
row
})
{
const
found
=
_this
.
invoiceStatus
.
find
(
item
=>
{
return
parseInt
(
item
.
value
)
===
parseInt
(
row
.
invoice_status
)
})
return
found
?
found
.
label
:
row
.
invoice_status
}
},
{
label
:
'开票状态'
,
prop
:
'invoiceStatusViewName'
},
{
label
:
'操作'
,
slots
:
'table-x'
,
align
:
'center'
,
fixed
:
'right'
}
],
data
:
[
{
invoice_code
:
'1'
,
invoice_num
:
'2016-05-02'
,
data1
:
'2016-05-02'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1518 弄'
,
order
:
'99832459873849'
},
{
invoice_code
:
'2'
,
invoice_num
:
'2016-05-04'
,
data1
:
'2016-05-02'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1517 弄'
,
order
:
'99832459873849'
},
{
invoice_code
:
'3'
,
invoice_num
:
'2016-05-01'
,
data1
:
'2016-05-02'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1519 弄'
,
order
:
'99832459873849'
},
{
invoice_code
:
'4'
,
invoice_num
:
'2016-05-03'
,
data1
:
'2016-05-02'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路 1516 弄'
,
order
:
'99832459873849'
}
]
}
}
},
created
()
{
getCondition
().
then
(
res
=>
{
this
.
conditionList
=
res
.
data
})
},
methods
:
{
dialogHide
()
{
this
.
isShowDialog
=
false
},
beforeRequest
(
params
,
isReset
)
{
// 重置
if
(
isReset
)
{
params
.
price_min
=
''
params
.
price_max
=
''
if
(
params
.
firstDate
)
{
const
[
firstTimeFrom
,
firstTimeTo
]
=
params
.
firstDate
params
.
first_payment_time_from
=
firstTimeFrom
params
.
first_payment_time_to
=
firstTimeTo
}
if
(
params
.
lastDate
)
{
const
[
finalTimeFrom
,
finalTimeTo
]
=
params
.
lastDate
params
.
final_payment_time_from
=
finalTimeFrom
params
.
final_payment_time_to
=
finalTimeTo
}
params
.
status
=
this
.
activeName
===
'0'
?
''
:
this
.
activeName
params
.
price_zone
=
`
${
params
.
price_min
||
''
}
,
${
params
.
price_max
||
''
}
`
return
params
},
//
编辑
handleUpdate
(
row
)
{
this
.
$router
.
push
({
name
:
'goodsEdit'
,
params
:
{
id
:
row
.
spu_id
}
})
//
分配票据跟进人弹窗
dialogHide
(
)
{
this
.
isShowDialog
=
false
},
// 选择
handleSelectionChange
(
value
)
{
this
.
multipleSelection
=
value
},
// 分配票据跟进人
isHandleSelection
()
{
this
.
multipleSelection
.
length
?
(
this
.
isShowDialog
=
true
)
:
this
.
$message
({
message
:
'请选择列表'
,
type
:
'warning'
})
},
// 选择跟进人后刷新列表
success
()
{
this
.
$refs
.
list
.
refetch
()
},
// 导出
exportSelect
()
{
const
list
=
this
.
tableOptions
.
columns
.
filter
(
item
=>
{
return
item
.
prop
&&
item
.
prop
!==
'head_img'
})
const
headList
=
list
.
map
(
item
=>
item
.
label
)
const
propList
=
list
.
map
(
item
=>
item
.
prop
)
const
excelList
=
[]
excelList
.
push
(
headList
)
console
.
log
(
this
.
tableOptions
.
columns
,
'321123=='
)
this
.
multipleSelection
.
forEach
(
item
=>
{
const
rowValArr
=
[]
propList
.
forEach
(
key
=>
{
let
val
=
item
[
key
]
if
(
key
===
'can_add_invoice'
)
val
=
val
===
'1'
?
'允许'
:
'不允许'
rowValArr
.
push
(
val
)
})
excelList
.
push
(
rowValArr
)
})
const
ws
=
XLSX
.
utils
.
aoa_to_sheet
(
excelList
)
ws
[
'!cols'
]
=
[
{
wpx
:
120
},
{
wpx
:
120
},
{
wpx
:
160
},
{
wpx
:
180
},
{
wpx
:
120
},
{
wpx
:
80
},
{
wpx
:
200
},
{
wpx
:
120
},
{
wpx
:
120
}
]
const
wb
=
XLSX
.
utils
.
book_new
()
wb
.
SheetNames
.
push
(
'Worksheet'
)
wb
.
Sheets
.
Worksheet
=
ws
const
wopts
=
{
bookType
:
'xlsx'
,
bookSST
:
false
,
type
:
'array'
}
const
wbout
=
XLSX
.
write
(
wb
,
wopts
)
const
url
=
URL
.
createObjectURL
(
new
window
.
Blob
([
wbout
],
{
type
:
'application/octet-stream'
}))
funDownload
(
url
,
`发票列表_
${
Date
.
now
()}
.xlsx`
)
},
// 过滤对应option label
findName
(
names
,
item
)
{
const
found
=
names
.
find
(
findItem
=>
{
return
parseInt
(
findItem
.
value
)
===
parseInt
(
item
)
})
return
found
?
found
.
label
:
item
}
}
}
...
...
src/modules/payment/views/List.vue
浏览文件 @
3c2cb2b2
...
...
@@ -216,6 +216,7 @@ export default {
],
moreFilters
:
[
{
prop
:
'sales_rep_user_id'
,
label
:
'跟进人'
,
type
:
'select'
,
placeholder
:
'跟进人'
,
...
...
@@ -226,6 +227,7 @@ export default {
remote
:
true
},
{
prop
:
'invoice_type'
,
label
:
'发票类型'
,
type
:
'select'
,
placeholder
:
'发票类型'
,
...
...
src/modules/project/views/List.vue
浏览文件 @
3c2cb2b2
<
template
>
<div>
<app-card
style=
"max-width: 100%"
>
<app-list
v-bind=
"tableOptions"
ref=
"list"
@
selection-change=
"handleSelectionChange"
>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<template
v-slot:table-x=
"
{ row }">
<router-link
:to=
"
{ name: 'invoiceView', params: { id: row.id } }">
<el-button
type=
"text"
>
查看
</el-button>
...
...
@@ -94,22 +94,6 @@ export default {
]
}
}
},
methods
:
{
beforeRequest
(
params
,
isReset
)
{
// 重置
if
(
isReset
)
{
params
.
price_min
=
''
params
.
price_max
=
''
}
params
.
status
=
this
.
activeName
===
'0'
?
''
:
this
.
activeName
params
.
price_zone
=
`
${
params
.
price_min
||
''
}
,
${
params
.
price_max
||
''
}
`
return
params
},
// 选择
handleSelectionChange
(
value
)
{
this
.
multipleSelection
=
value
}
}
}
</
script
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论