Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1403b4e1
authored
Feb 25, 2022
by
wangql
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
财务列表下载对账单
1 parent
4d3e9ede
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
189 additions
and
0 deletions
src/api/finance.js
src/api/publicAccount.js
src/router/routes.js
src/views/financeManage/downloadAccountDialog.vue
src/views/financeManage/financeList.vue
src/api/finance.js
View file @
1403b4e
...
@@ -46,3 +46,8 @@ export function getServiceSummaryApi(data) {
...
@@ -46,3 +46,8 @@ export function getServiceSummaryApi(data) {
data
.
method
=
`
${
path2
}
goodsOrderProfitAllocation.count.service.merchant`
data
.
method
=
`
${
path2
}
goodsOrderProfitAllocation.count.service.merchant`
return
request
(
data
,
'post'
)
return
request
(
data
,
'post'
)
}
}
export
function
exportAccountStatement
(
data
)
{
data
.
method
=
`
${
path2
}
goodsOrderProfitAllocation.exportAccountStatement`
return
request
(
data
,
'post'
)
}
src/api/publicAccount.js
View file @
1403b4e
...
@@ -32,3 +32,9 @@ export function getMerchantLevelApi(data) {
...
@@ -32,3 +32,9 @@ export function getMerchantLevelApi(data) {
data
.
method
=
`
${
djPath
}
smartcarlife.get.merchant.level`
data
.
method
=
`
${
djPath
}
smartcarlife.get.merchant.level`
return
request
(
data
,
'post'
)
return
request
(
data
,
'post'
)
}
}
// 分页搜索服务门店
export
function
getMerchantPageSearch
(
data
)
{
data
.
method
=
`
${
path
}
page.search`
return
request
(
data
,
'post'
)
}
src/router/routes.js
View file @
1403b4e
This diff is collapsed.
Click to expand it.
src/views/financeManage/downloadAccountDialog.vue
0 → 100644
View file @
1403b4e
<!-- 下载对账单 -->
<
template
>
<div>
<d2-dialog
title=
"下载对账单"
:isVisible=
"accountVisible"
width=
"40%"
btnOkLabel=
"确定下载"
@
closeDialog=
"handleClose"
@
confirmDialog=
"handleAddConfirm"
>
<el-form
ref=
"accountForm"
:model=
"infoForm"
:rules=
"formRules"
label-width=
"120px"
>
<el-form-item
label=
"商户类型:"
prop=
"merchantType"
>
<el-radio-group
v-model=
"infoForm.merchantType"
@
change=
"changeType"
>
<el-radio-button
label=
"2"
>
4S店
</el-radio-button>
<el-radio-button
label=
"7"
>
服务商
</el-radio-button>
<el-radio-button
label=
"6"
>
园区店
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"选择商户:"
prop=
"merchant"
>
<el-select
v-model=
"infoForm.merchant"
multiple
filterable
remote
reserve-keyword
:remote-method=
"remoteMethod"
:loading=
"selectLoading"
style=
"width:350px"
>
<el-option
v-for=
"(item, index) in baseData.merchantList"
:key=
"item.merchantId"
:label=
"item.merchantName"
:value=
"item.merchantId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"订单支付时间:"
prop=
"time"
>
<el-date-picker
v-model=
"infoForm.time"
type=
"daterange"
value-format=
"yyyy-MM-dd"
clearable
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:picker-options=
"pickerOption['rangePickerOptions']"
>
</el-date-picker>
</el-form-item>
</el-form>
</d2-dialog>
</div>
</
template
>
<
script
>
import
{
BaseData
,
rangePickerOptions
}
from
'@/common/constants.js'
import
*
as
api
from
'@api/finance'
import
{
getMerchantPageSearch
}
from
'@api/publicAccount'
export
default
{
name
:
'downloadAccountDialog'
,
data
()
{
return
{
pickerOption
:
{
rangePickerOptions
:
rangePickerOptions
},
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
infoForm
:
{
merchantType
:
2
,
merchant
:
[],
time
:
''
},
formRules
:
{
merchantType
:
[{
required
:
true
,
message
:
'请选择商户类型'
,
trigger
:
'change'
}],
merchant
:
[{
required
:
true
,
message
:
'请选择商户'
,
trigger
:
'change'
}],
time
:
[{
required
:
true
,
message
:
'请选择时间'
,
trigger
:
'change'
}]
},
selectLoading
:
false
,
// 基本数据
baseData
:
{
merchantList
:
[]
}
}
},
props
:
{
accountVisible
:
{
type
:
Boolean
,
default
:
false
},
},
watch
:
{
// accountVisible (value) {
// if (value && this.couponInfo) {
// var addAttr = ['chargeFlag', 'merchantType', 'merchantTypeName']
// this.infoForm = _.cloneDeep(this.couponInfo)
// addAttr.forEach(item => {
// this.infoForm[item] = this.infoForm.couponInfo[item]
// })
// // console.log(this.infoForm)
// }
// }
},
created
()
{
// this.$nextTick(() => {
// this.$refs.accountForm.resetFields();
// })
},
components
:
{
},
mounted
()
{
},
methods
:
{
changeType
()
{
this
.
infoForm
.
merchant
=
''
this
.
baseData
.
merchantList
=
[]
},
remoteMethod
(
query
)
{
if
(
query
!==
''
)
{
this
.
selectLoading
=
true
var
params
=
{}
params
.
currentPage
=
1
params
.
pageSize
=
1000
params
.
merchantName
=
query
var
merchantTypeList
=
this
.
infoForm
.
merchantType
?
[
this
.
infoForm
.
merchantType
]
:
[]
params
.
merchantTypeList
=
merchantTypeList
getMerchantPageSearch
(
params
).
then
(
res
=>
{
this
.
selectLoading
=
false
this
.
baseData
.
merchantList
=
res
.
list
})
}
else
{
this
.
baseData
.
merchantList
=
[];
}
},
handleAddConfirm
()
{
// console.log(this.infoForm.remark)
this
.
$refs
.
accountForm
.
validate
(
valid
=>
{
if
(
valid
)
{
var
infoForm
=
_
.
cloneDeep
(
this
.
infoForm
)
console
.
log
(
infoForm
)
var
params
=
{}
var
merchantList
=
[]
var
obj
infoForm
.
merchant
.
forEach
(
item
=>
{
obj
=
{}
obj
.
merchantId
=
item
obj
.
merchantName
=
this
.
baseData
.
merchantList
.
find
(
mer
=>
mer
.
merchantId
===
item
).
merchantName
merchantList
.
push
(
obj
)
})
params
.
payStartDate
=
infoForm
.
time
[
0
]
+
" 00:00:00"
params
.
payEndDate
=
infoForm
.
time
[
1
]
+
" 23:59:59"
params
.
merchantList
=
merchantList
console
.
log
(
params
);
api
.
exportAccountStatement
(
params
).
then
(
res
=>
{
window
.
location
.
href
=
res
})
}
})
},
handleClose
()
{
this
.
$emit
(
'accountClose'
,
true
)
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/financeManage/financeList.vue
View file @
1403b4e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment