Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
c496fa69
Commit
c496fa69
authored
Aug 30, 2022
by
huaying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 核销记录
parent
500bc022
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
79 additions
and
67 deletions
+79
-67
cardApi.js
src/service/api/cardApi.js
+2
-0
addStoreDialog.vue
src/views/card/addStoreDialog.vue
+10
-4
links.vue
src/views/card/links.vue
+6
-2
setStaffDialog.vue
src/views/card/setStaffDialog.vue
+8
-3
store-list.vue
src/views/card/store-list.vue
+9
-3
writeOff.js
src/views/card/writeOff.js
+5
-4
writeOffCard.vue
src/views/card/writeOffCard.vue
+21
-3
writeOffStore.vue
src/views/card/writeOffStore.vue
+18
-25
writeOffStoreDetail.vue
src/views/card/writeOffStoreDetail.vue
+0
-23
No files found.
src/service/api/cardApi.js
View file @
c496fa69
...
...
@@ -216,6 +216,8 @@ export const importCostStore = params => requests('/api-marketing/import-cost-st
export
const
getCardLogPage
=
params
=>
requests
(
PREFIX
+
'card-write-off-log-page'
,
params
);
//核销记录导出
export
const
exportCardLog
=
params
=>
requests
(
PREFIX
+
'export-card-write-off-log'
,
params
);
//核销记录导出(门店)
export
const
exportStoreLog
=
params
=>
requests
(
PREFIX
+
'export-card-write-off-store'
,
params
);
//核销数据 (门店)列表
export
const
getCardStorePage
=
params
=>
requests
(
PREFIX
+
'card-write-off-store-page'
,
params
);
//核销数据 (门店)--明细列表
...
...
src/views/card/addStoreDialog.vue
View file @
c496fa69
...
...
@@ -35,6 +35,7 @@ export default {
this
.
uuid
=
''
;
this
.
$nextTick
(
_
=>
{
this
.
$emit
(
'update:show'
,
false
);
this
.
$emit
(
'refresh'
);
});
},
async
saving
()
{
...
...
@@ -55,10 +56,15 @@ export default {
};
return
para
;
});
await
addStore
({
storeList
:
res
}).
then
(
res
=>
{
this
.
loadings
=
false
;
this
.
handleClose
();
});
await
addStore
({
storeList
:
res
})
.
then
(
res
=>
{
this
.
loadings
=
false
;
this
.
handleClose
();
})
.
catch
(
err
=>
{
this
.
$tips
({
type
:
'error'
,
message
:
err
.
message
||
'操作失败'
});
this
.
loadings
=
false
;
});
}
else
{
this
.
loadings
=
false
;
this
.
$tips
({
type
:
'waring'
,
message
:
'请完善表单'
});
...
...
src/views/card/links.vue
View file @
c496fa69
...
...
@@ -11,7 +11,7 @@
<div
class=
"links__qr"
>
<div
style=
"text-align:center; background: #FFFFFF;border-radius: 2px;"
>
<vue-qr
v-if=
"sourceType"
id=
"qrImg"
:text=
"src"
:size=
"130"
:margin=
"5"
></vue-qr>
<img
v-else
:src=
"src
"
class=
"imgs"
/>
<img
:src=
"src"
id=
"qrImg
"
class=
"imgs"
/>
</div>
<el-button
type=
"text"
v-show=
"src"
@
click=
"download"
><i
class=
"iconfont icon-xiazai font-14"
></i>
小程序二维码下载
</el-button>
</div>
...
...
@@ -30,6 +30,10 @@ export default {
type
:
Boolean
,
default
:
false
},
link
:
{
type
:
String
,
default
:
''
},
src
:
{
type
:
String
,
default
:
''
...
...
@@ -40,7 +44,7 @@ export default {
},
sourceType
:
{
type
:
Boolean
,
default
:
tru
e
default
:
fals
e
}
},
data
()
{
...
...
src/views/card/setStaffDialog.vue
View file @
c496fa69
...
...
@@ -34,13 +34,13 @@ export default {
//验证手机号的正则表达式
let
reg
=
/^
(((
13
[
0-9
]{1})
|
(
15
[
0-9
]{1})
|
(
16
[
0-9
]{1})
|
(
17
[
3-8
]{1})
|
(
18
[
0-9
]{1})
|
(
19
[
0-9
]{1})
|
(
14
[
5-7
]{1}))
+
\d{8})
$/
;
//验证方法
let
validatorPhone
=
(
writeOffPhone
,
value
,
callback
)
=>
{
let
validatorPhone
=
async
(
writeOffPhone
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'手机号不能为空'
));
}
else
if
(
!
reg
.
test
(
value
))
{
callback
(
new
Error
(
'手机号格式错误'
));
}
else
if
(
value
)
{
searchRePhone
({
writeOffPhone
:
this
.
form
.
writeOffPhon
e
}).
then
(
res
=>
{
await
searchRePhone
({
writeOffPhone
:
valu
e
}).
then
(
res
=>
{
if
(
res
.
errorCode
==
0
)
{
if
(
!
res
.
result
)
{
callback
(
new
Error
(
'手机号码已存在'
));
...
...
@@ -50,6 +50,7 @@ export default {
}
});
}
callback
();
};
return
{
loadings
:
false
,
...
...
@@ -82,7 +83,10 @@ export default {
if
(
!
this
.
form
.
writeOffStoreStaffId
)
{
delete
this
.
form
.
writeOffStoreStaffId
;
}
setStraff
(
this
.
form
)
let
param
=
{
...
this
.
form
};
setStraff
(
param
)
.
then
(
res
=>
{
this
.
$tips
({
type
:
'success'
,
message
:
'操作成功'
});
this
.
loading
=
false
;
...
...
@@ -94,6 +98,7 @@ export default {
this
.
loading
=
false
;
});
}
else
{
this
.
loadings
=
false
;
return
false
;
}
this
.
loadings
=
false
;
...
...
src/views/card/store-list.vue
View file @
c496fa69
...
...
@@ -45,7 +45,7 @@
</div>
<dm-pagination
v-show=
"tableData.length"
background
class=
"dm-pagination"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"listParams.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"listParams.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></dm-pagination>
</div>
<links
:src=
"linkUrl"
:show
.
sync=
"linkShow"
:imageName=
"核销工具二维码"
/>
<links
:
link=
"link"
:
src=
"linkUrl"
:show
.
sync=
"linkShow"
:imageName=
"核销工具二维码"
/>
<add-store-dialog
:show
.
sync=
"addStoreShow"
@
refresh=
"getList"
></add-store-dialog>
<set-staff-dialog
:show
.
sync=
"setStraffShow"
:row=
"straffDetail"
@
refresh=
"getList"
></set-staff-dialog>
</div>
...
...
@@ -73,7 +73,8 @@ export default {
},
total
:
0
,
linkShow
:
false
,
linkUrl
:
'api-marketing/card-write-off-qrcode'
,
linkUrl
:
''
,
link
:
''
,
addStoreShow
:
false
,
setStraffShow
:
false
,
straffDetail
:
{}
...
...
@@ -143,7 +144,12 @@ export default {
},
// 核销工具二维码
async
qrEvent
()
{
await
getwriteOffQr
({}).
then
(()
=>
{
await
getwriteOffQr
({}).
then
(
res
=>
{
if
(
res
.
errorCode
==
0
)
{
this
.
link
=
res
.
result
.
link
;
this
.
linkUrl
=
res
.
result
.
url
;
}
console
.
log
(
res
.
result
,
'link'
);
this
.
linkShow
=
true
;
});
}
...
...
src/views/card/writeOff.js
View file @
c496fa69
import
{
export
Card
Log
}
from
'@/service/api/cardApi.js'
;
import
{
export
Store
Log
}
from
'@/service/api/cardApi.js'
;
import
{
formatDateTimeByType
}
from
'@/utils/index.js'
;
export
default
{
data
()
{
...
...
@@ -106,14 +106,15 @@ export default {
this
.
params
.
writeOffEndTime
=
''
;
}
},
exportResult
()
{
export
Store
Result
()
{
const
paras
=
{
search
:
this
.
params
.
search
,
writeOffBeginTime
:
this
.
params
.
writeOffBeginTime
,
writeOffEndTime
:
this
.
params
.
writeOffEndTime
,
sortBy
:
this
.
params
.
sortBy
sortBy
:
this
.
params
.
sortBy
,
dataType
:
0
};
export
Card
Log
(
paras
).
then
(
res
=>
{
export
Store
Log
(
paras
).
then
(
res
=>
{
if
(
res
.
result
.
errorCode
==
'0'
)
{
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
...
...
src/views/card/writeOffCard.vue
View file @
c496fa69
...
...
@@ -29,7 +29,9 @@
</
template
>
</el-table-column>
<el-table-column
label=
"核销金额"
prop=
"writeOffPrice"
min-width=
"100px"
></el-table-column>
<el-table-column
label=
"成本比例"
prop=
"costValueProportion"
min-width=
"92px"
></el-table-column>
<el-table-column
label=
"成本比例"
prop=
"costValueProportion"
min-width=
"92px"
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
costValueProportion
}}
%
</
template
>
</el-table-column>
<el-table-column
label=
"成本金额"
prop=
"costValue"
min-width=
"100px"
></el-table-column>
<el-table-column
label=
"核销门店"
prop=
"storeName"
min-width=
"100px"
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"核销操作人"
prop=
"writeOffName"
min-width=
"118px"
show-overflow-tooltip
></el-table-column>
...
...
@@ -48,12 +50,13 @@
<el-table-column
label=
"卡券代码"
prop=
"cardCode"
min-width=
"117px"
show-overflow-tooltip
></el-table-column>
</el-table>
<dm-pagination
v-show=
"tableData.length"
background
class=
"dm-pagination"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"params.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"params.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></dm-pagination>
<vue-gic-export-excel
:dialogVisible
.
sync=
"dialogVisible"
:dataArr=
"tableData"
:type=
"2"
:excelUrl=
"excelUrl"
:params=
"paramsex"
:projectName=
"projectName"
></vue-gic-export-excel>
</div>
</div>
</template>
<
script
>
import
{
getCardLogPage
}
from
'@/service/api/cardApi.js'
;
import
{
getCardLogPage
,
exportCardLog
}
from
'@/service/api/cardApi.js'
;
import
writeOff
from
'./writeOff'
;
export
default
{
name
:
'writeOffCard'
,
...
...
@@ -67,7 +70,11 @@ export default {
search
:
''
,
currentPage
:
1
,
pageSize
:
20
}
},
dialogVisible
:
false
,
paramsex
:
{},
excelUrl
:
''
,
projectName
:
'marketing'
// 当前项目名
};
},
mounted
()
{
...
...
@@ -90,6 +97,17 @@ export default {
.
catch
(()
=>
{
this
.
loading
=
false
;
});
},
exportResult
()
{
this
.
dialogVisible
=
true
;
this
.
excelUrl
=
exportCardLog
;
this
.
params
=
{
search
:
this
.
params
.
search
,
writeOffBeginTime
:
this
.
params
.
writeOffBeginTime
,
writeOffEndTime
:
this
.
params
.
writeOffEndTime
,
sortBy
:
this
.
params
.
sortBy
,
dataType
:
1
};
}
}
};
...
...
src/views/card/writeOffStore.vue
View file @
c496fa69
...
...
@@ -23,12 +23,13 @@
</el-table-column>
</el-table>
<dm-pagination
v-show=
"tableData.length"
background
class=
"dm-pagination"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"params.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"params.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></dm-pagination>
<vue-gic-export-excel
:dialogVisible
.
sync=
"dialogVisible"
:dataArr=
"tableData"
:type=
"2"
:excelUrl=
"excelUrl"
:params=
"paramsex"
:projectName=
"projectName"
></vue-gic-export-excel>
</div>
</div>
</template>
<
script
>
import
{
getCardStorePage
}
from
'@/service/api/cardApi.js'
;
import
{
getCardStorePage
,
exportStoreLog
}
from
'@/service/api/cardApi.js'
;
import
writeOff
from
'./writeOff'
;
export
default
{
name
:
'writeOffCard'
,
...
...
@@ -42,7 +43,11 @@ export default {
search
:
''
,
currentPage
:
1
,
pageSize
:
20
}
},
dialogVisible
:
false
,
paramsex
:
{},
excelUrl
:
''
,
projectName
:
'marketing'
// 当前项目名
};
},
mounted
()
{
...
...
@@ -57,29 +62,6 @@ export default {
if
(
res
.
errorCode
==
0
)
{
this
.
tableData
=
res
.
result
.
result
||
[];
this
.
total
=
res
.
result
.
totalCount
;
// this.tableData = [
// {
// storeId: 1,
// storeName: 'cehsai',
// writeOffPrice: '23',
// writeOffCount: '66',
// costValue: '66'
// },
// {
// storeId: 2,
// storeName: 'daf',
// writeOffPrice: '25',
// writeOffCount: '55',
// costValue: '33'
// },
// {
// storeId: 3,
// storeName: 'cehsdfasai',
// writeOffPrice: '21',
// writeOffCount: '88',
// costValue: '44'
// }
// ];
}
else
{
this
.
$tips
({
type
:
'error'
,
message
:
'加载列表失败'
});
}
...
...
@@ -92,6 +74,17 @@ export default {
// 明细
details
(
row
)
{
this
.
$router
.
push
(
`/card/storeDetails?id=
${
row
.
storeId
}
`
);
},
exportResult
()
{
this
.
dialogVisible
=
true
;
this
.
excelUrl
=
exportStoreLog
;
this
.
params
=
{
search
:
this
.
params
.
search
,
writeOffBeginTime
:
this
.
params
.
writeOffBeginTime
,
writeOffEndTime
:
this
.
params
.
writeOffEndTime
,
sortBy
:
this
.
params
.
sortBy
,
dataType
:
1
};
}
}
};
...
...
src/views/card/writeOffStoreDetail.vue
View file @
c496fa69
...
...
@@ -54,29 +54,6 @@ export default {
if
(
res
.
errorCode
==
0
)
{
this
.
tableData
=
res
.
result
.
result
||
[];
this
.
total
=
res
.
result
.
totalCount
;
this
.
tableData
=
[
{
storeId
:
1
,
storeName
:
'cehsai'
,
writeOffPrice
:
'23'
,
writeOffCount
:
'66'
,
costValue
:
'66'
},
{
storeId
:
2
,
storeName
:
'daf'
,
writeOffPrice
:
'25'
,
writeOffCount
:
'55'
,
costValue
:
'33'
},
{
storeId
:
3
,
storeName
:
'cehsdfasai'
,
writeOffPrice
:
'21'
,
writeOffCount
:
'88'
,
costValue
:
'44'
}
];
}
else
{
this
.
$tips
({
type
:
'error'
,
message
:
'加载列表失败'
});
}
...
...
Write
Preview
Markdown
is supported
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