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 30239df0
authored
Dec 22, 2025
by
Lin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 门店毛利额导入导出接口联调
1 parent
6bedddb0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
31 deletions
src/api/shopConfig.js
src/views/systemConfig/ShopConfig/storeGrossProfit/index.vue
src/api/shopConfig.js
View file @
30239df
...
@@ -363,5 +363,5 @@ export function exportProfit(data) {
...
@@ -363,5 +363,5 @@ export function exportProfit(data) {
// 门店毛利额-导入
// 门店毛利额-导入
export
function
importProfit
(
data
)
{
export
function
importProfit
(
data
)
{
data
.
method
=
`dj.api.script.merchant.profit.record.async.import`
data
.
method
=
`dj.api.script.merchant.profit.record.async.import`
return
request
(
data
)
return
request
(
data
,
"post"
,
[
"file"
]
)
}
}
\ No newline at end of file
\ No newline at end of file
src/views/systemConfig/ShopConfig/storeGrossProfit/index.vue
View file @
30239df
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
</el-select>
</el-select>
</div>
</div>
<div
slot=
"dealMonthHtml"
>
<div
slot=
"dealMonthHtml"
>
<el-date-picker
v-model=
"searchForm.
dealMonth
"
<el-date-picker
v-model=
"searchForm.
monthYear
"
type=
"month"
type=
"month"
value-format=
"yyyy-MM"
value-format=
"yyyy-MM"
format=
"yyyy-MM"
format=
"yyyy-MM"
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
import
{
Util
,
deepClone
}
from
"@/common/util"
import
{
Util
,
deepClone
}
from
"@/common/util"
import
inputRange
from
'./components/inputRange'
import
inputRange
from
'./components/inputRange'
import
editDialog
from
"./components/editDialog"
import
editDialog
from
"./components/editDialog"
import
{
listProfitPage
,
personalConfigImpor
t
,
deleteProfit
}
from
'@api/shopConfig'
import
{
listProfitPage
,
importProfi
t
,
deleteProfit
}
from
'@api/shopConfig'
import
{
getList
}
from
"@api/merchant"
import
{
getList
}
from
"@api/merchant"
import
reportTrackFunMixin
from
'@/mixins/reportTrackFunMixin'
import
reportTrackFunMixin
from
'@/mixins/reportTrackFunMixin'
export
default
{
export
default
{
...
@@ -164,11 +164,8 @@
...
@@ -164,11 +164,8 @@
return
{
return
{
searchForm
:
{
searchForm
:
{
storeId
:
[],
storeId
:
[],
brandChildIds
:
[],
monthYear
:
""
,
brandId
:
""
,
profitAmount
:
[],
dealMonth
:
""
,
dealRate
:
[],
createTime
:
""
,
businessType
:
""
businessType
:
""
},
},
searchFormSearch
:
{},
searchFormSearch
:
{},
...
@@ -405,9 +402,7 @@
...
@@ -405,9 +402,7 @@
handleReset
()
{
handleReset
()
{
this
.
searchForm
=
{
this
.
searchForm
=
{
storeId
:
[],
storeId
:
[],
brandChildIds
:
[],
monthYear
:
""
,
brandId
:
""
,
dealMonth
:
""
,
dealRate
:
[],
dealRate
:
[],
createTime
:
""
,
createTime
:
""
,
businessType
:
""
businessType
:
""
...
@@ -456,31 +451,34 @@
...
@@ -456,31 +451,34 @@
handleExport
()
{
handleExport
()
{
var
params
=
this
.
searchFormSearch
var
params
=
this
.
searchFormSearch
if
(
params
.
merchantIds
.
length
>
0
)
{
// if (params.merchantIds.length > 0) {
params
.
merchantIds
.
forEach
((
item
,
index
)
=>
{
// params.merchantIds.forEach((item, index) => {
const
merchantId
=
`merchantIds[
${
index
}
]`
// const merchantId = `merchantIds[${index}]`
params
[
merchantId
]
=
item
// params[merchantId] = item
})
// })
delete
params
.
merchantIds
// delete params.merchantIds
}
// }
if
(
params
.
brandChildIds
.
length
>
0
)
{
// if (params.brandChildIds.length > 0) {
params
.
brandChildIds
.
forEach
((
item
,
index
)
=>
{
// params.brandChildIds.forEach((item, index) => {
const
brandChildId
=
`brandChildIds[
${
index
}
]`
// const brandChildId = `brandChildIds[${index}]`
params
[
brandChildId
]
=
item
// params[brandChildId] = item
})
// })
delete
params
.
brandChildIds
// delete params.brandChildIds
}
// }
console
.
log
(
'AAparamsAA'
,
params
);
// 去除为null的值
// 去除为null的值
for
(
const
key
in
params
)
{
for
(
const
key
in
params
)
{
if
(
params
[
key
]
===
null
||
params
[
key
]
===
''
||
params
[
key
].
length
==
0
)
{
if
(
params
[
key
]
===
null
||
params
[
key
]
===
''
||
params
[
key
].
length
==
0
)
{
delete
params
[
key
]
delete
params
[
key
]
}
}
}
}
params
.
method
=
'dj.api.smartcarlife.employee.delivery.deal.rate.export.async'
// params.method = 'dj.api.smartcarlife.employee.delivery.deal.rate.export.async'
params
.
method
=
'dj.api.script.merchant.profit.record.async.export'
const
list
=
[
const
list
=
[
...
this
.
dowloadList
,
...
this
.
dowloadList
,
{
{
name
:
'
个人交付成交率
'
,
name
:
'
门店毛利额
'
,
exportParam
:
JSON
.
stringify
(
params
),
exportParam
:
JSON
.
stringify
(
params
),
status
:
'waiting'
,
status
:
'waiting'
,
timeid
:
new
Date
().
getTime
()
timeid
:
new
Date
().
getTime
()
...
@@ -489,14 +487,14 @@
...
@@ -489,14 +487,14 @@
this
.
actionSetDownloadList
({
list
,
type
:
'dowloadList'
})
this
.
actionSetDownloadList
({
list
,
type
:
'dowloadList'
})
},
},
//
个人交付成交率
导入模版下载
//
门店毛利额
导入模版下载
exportTemplate
()
{
exportTemplate
()
{
var
params
=
{}
var
params
=
{}
params
.
method
=
'dj.api.s
martcarlife.employee.delivery.deal.rate.template.ex
port'
params
.
method
=
'dj.api.s
cript.merchant.profit.record.async.im
port'
const
list
=
[
const
list
=
[
...
this
.
dowloadList
,
...
this
.
dowloadList
,
{
{
name
:
'
个人交付成交率
导入模版'
,
name
:
'
门店毛利额
导入模版'
,
exportParam
:
JSON
.
stringify
(
params
),
exportParam
:
JSON
.
stringify
(
params
),
status
:
'waiting'
,
status
:
'waiting'
,
timeid
:
new
Date
().
getTime
()
timeid
:
new
Date
().
getTime
()
...
@@ -537,7 +535,7 @@
...
@@ -537,7 +535,7 @@
var
params
=
{
var
params
=
{
file
:
this
.
fileInfo
file
:
this
.
fileInfo
}
}
personalConfigImpor
t
(
params
).
then
(
res
=>
{
importProfi
t
(
params
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
// 异步处理文件上传 把id传入处理轮询
// 异步处理文件上传 把id传入处理轮询
const
list
=
[...
this
.
updateList
,
{
const
list
=
[...
this
.
updateList
,
{
...
...
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