Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-pay
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 80dd7a61
authored
Nov 08, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
分类,晒单
1 parent
fc21c280
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
138 additions
and
54 deletions
src/api/modules/classifyList.js
src/api/modules/orderShare.js
src/api/modules/zoneList.js
src/assets/css/public.scss
src/views/classifyList/editClassify.vue
src/views/classifyList/index.vue
src/views/orderShare/index.vue
src/views/zoneList/index.vue
src/api/modules/classifyList.js
View file @
80dd7a6
...
@@ -22,4 +22,37 @@ const getClassifyInfoApi = params => {
...
@@ -22,4 +22,37 @@ const getClassifyInfoApi = params => {
})
})
}
}
export
default
{
getListApi
,
getClassifyInfoApi
}
const
insertClassifyApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
classify.insertOrUpdate`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
const
deleteClassifyApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
classify.delete`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
const
topClassifyApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
classify.updateToTop`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
export
default
{
getListApi
,
getClassifyInfoApi
,
insertClassifyApi
,
deleteClassifyApi
,
topClassifyApi
}
src/api/modules/orderShare.js
View file @
80dd7a6
...
@@ -12,4 +12,26 @@ const getListApi = params => {
...
@@ -12,4 +12,26 @@ const getListApi = params => {
})
})
}
}
export
default
{
getListApi
}
const
deleteShareRecordApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
orderShareRecord.remove`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
const
revokeShareRecordApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
orderShareRecord.revoke`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
export
default
{
getListApi
,
deleteShareRecordApi
,
revokeShareRecordApi
}
src/api/modules/zoneList.js
View file @
80dd7a6
...
@@ -16,7 +16,7 @@ const deleteZoneApi = params => {
...
@@ -16,7 +16,7 @@ const deleteZoneApi = params => {
params
.
method
=
`
${
defaultPath
}
zoneInfo.delete`
params
.
method
=
`
${
defaultPath
}
zoneInfo.delete`
return
http
({
return
http
({
url
:
'rop-scrm-shopmall/router'
,
url
:
'rop-scrm-shopmall/router'
,
method
:
'
GE
T'
,
method
:
'
POS
T'
,
data
:
params
,
data
:
params
,
sign
:
true
,
sign
:
true
,
returnAll
:
true
returnAll
:
true
...
@@ -37,7 +37,7 @@ const insertZoneApi = params => {
...
@@ -37,7 +37,7 @@ const insertZoneApi = params => {
params
.
method
=
`
${
defaultPath
}
zoneInfo.insertOrUpdate`
params
.
method
=
`
${
defaultPath
}
zoneInfo.insertOrUpdate`
return
http
({
return
http
({
url
:
'rop-scrm-shopmall/router'
,
url
:
'rop-scrm-shopmall/router'
,
method
:
'
GE
T'
,
method
:
'
POS
T'
,
data
:
params
,
data
:
params
,
sign
:
true
,
sign
:
true
,
returnAll
:
true
returnAll
:
true
...
...
src/assets/css/public.scss
View file @
80dd7a6
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
.marketing
.footer-btns
{
.marketing
.footer-btns
{
float
:
right
;
float
:
right
;
margin-bottom
:
18px
;
}
}
.el-scrollbar__bar.is-horizontal
{
.el-scrollbar__bar.is-horizontal
{
...
...
src/views/classifyList/editClassify.vue
View file @
80dd7a6
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</
template
>
</
template
>
<span
slot=
"auth-button"
slot-scope=
"scope"
>
<span
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleProDelete(scope)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"handleProDelete(scope)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"handlePro
Delete
(scope)"
>
置顶
</el-button>
<el-button
type=
"text"
@
click=
"handlePro
Top
(scope)"
>
置顶
</el-button>
</span>
</span>
</GLTable>
</GLTable>
</div>
</div>
...
@@ -162,6 +162,11 @@ export default {
...
@@ -162,6 +162,11 @@ export default {
}
}
})
})
},
},
handleProTop
(
obj
)
{
var
idx
=
this
.
editForm
.
goodsRefList
.
findIndex
(
item
=>
item
.
id
==
obj
.
scope
.
id
)
this
.
editForm
.
goodsRefList
.
splice
(
idx
,
1
)
this
.
editForm
.
goodsRefList
.
unshift
(
obj
.
scope
)
},
handleConfirm
()
{
handleConfirm
()
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
@@ -172,15 +177,15 @@ export default {
...
@@ -172,15 +177,15 @@ export default {
if
(
this
.
routeInfo
.
addOrEdit
==
2
)
{
if
(
this
.
routeInfo
.
addOrEdit
==
2
)
{
params
.
id
=
this
.
routeInfo
.
id
params
.
id
=
this
.
routeInfo
.
id
}
}
// this.$apis.zoneList.insertZone
Api(params).then(res => {
this
.
$apis
.
classifyList
.
insertClassify
Api
(
params
).
then
(
res
=>
{
//
this.$message({
this
.
$message
({
//
message: res.code == '0' ? '操作成功' : '操作失败',
message
:
res
.
code
==
'0'
?
'操作成功'
:
'操作失败'
,
//
type: res.code == '0' ? 'success' : 'error'
type
:
res
.
code
==
'0'
?
'success'
:
'error'
//
})
})
//
if (res.code == '0') {
if
(
res
.
code
==
'0'
)
{
//
this.handleCancel()
this
.
handleCancel
()
//
}
}
//
})
})
}
}
})
})
},
},
...
...
src/views/classifyList/index.vue
View file @
80dd7a6
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleEdit(2, scope.scope)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"handleEdit(2, scope.scope)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"handle
Delete
(scope.scope)"
>
置顶
</el-button>
<el-button
type=
"text"
@
click=
"handle
Top
(scope.scope)"
>
置顶
</el-button>
</div>
</div>
</GLTable>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 end -->
...
@@ -96,31 +96,40 @@ export default {
...
@@ -96,31 +96,40 @@ export default {
resolve
()
resolve
()
})
})
},
},
// 1-新增;2-编辑
handleEdit
(
addOrEdit
,
row
)
{
addOrEdit
==
1
?
this
.
$router
.
push
(
'/classifyList/editClassify/'
+
addOrEdit
)
:
this
.
$router
.
push
(
'/classifyList/editClassify/'
+
addOrEdit
+
'/'
+
row
.
id
)
},
handleDelete
(
row
)
{
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
this
.
$confirm
(
'是否确认删除该专区?'
,
'删除'
,
{
this
.
$confirm
(
txt
,
title
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
callback
:
action
=>
{
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
if
(
action
==
'confirm'
)
{
// this.$apis.zoneList.deleteZoneApi({ id: row.id }).then(res => {
this
.
$apis
[
apiModule
][
apiName
](
apiParams
).
then
(
res
=>
{
// this.$message({
this
.
$message
({
// message: res.code == '0' ? '操作成功' : res.message,
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
// type: res.code == '0' ? 'success' : 'error'
type
:
res
.
code
==
'0'
?
'success'
:
'error'
// })
})
// if (res.code == '0') {
if
(
res
.
code
==
'0'
)
{
// this.handleSearch()
fn
&&
fn
()
// }
this
.
handleSearch
()
// })
}
})
}
}
}
}
})
})
},
},
// 1-新增;2-编辑
handleEdit
(
addOrEdit
,
row
)
{
addOrEdit
==
1
?
this
.
$router
.
push
(
'/classifyList/editClassify/'
+
addOrEdit
)
:
this
.
$router
.
push
(
'/classifyList/editClassify/'
+
addOrEdit
+
'/'
+
row
.
id
)
},
handleDelete
(
row
)
{
this
.
secondConfirm
(
'删除'
,
'此功能只删除小程序对应分类区,不会删除分类下的商品,确定删除此分类?'
,
'classifyList'
,
'deleteClassifyApi'
,
{
id
:
row
.
id
})
},
handleTop
(
row
)
{
this
.
secondConfirm
(
'置顶'
,
'确定置顶此分类?'
,
'classifyList'
,
'topClassifyApi'
,
{
id
:
row
.
id
})
},
handleSearch
()
{
handleSearch
()
{
this
.
$refs
.
classifyRef
.
refreshTable
()
this
.
$refs
.
classifyRef
.
refreshTable
()
...
...
src/views/orderShare/index.vue
View file @
80dd7a6
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
<!-- 表格区域 开始 -->
<!-- 表格区域 开始 -->
<GLTable
ref=
"shareRef"
:getListApi=
"getListApi"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<GLTable
ref=
"shareRef"
:getListApi=
"getListApi"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleEdit(2, scope.scope)"
>
发布
</el-button>
<el-button
v-if=
"scope.scope.shareStatus == 0"
type=
"text"
@
click=
"handleEdit(2, scope.scope)"
>
发布
</el-button>
<el-button
type=
"text"
@
click=
"handleEdit(2,
scope.scope)"
>
撤回
</el-button>
<el-button
v-if=
"scope.scope.shareStatus == 1"
type=
"text"
@
click=
"handleRevoke(
scope.scope)"
>
撤回
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
</div>
</div>
</GLTable>
</GLTable>
...
@@ -139,31 +139,40 @@ export default {
...
@@ -139,31 +139,40 @@ export default {
resolve
()
resolve
()
})
})
},
},
// 1-新增;2-编辑
handleEdit
(
addOrEdit
,
row
)
{
addOrEdit
==
1
?
this
.
$router
.
push
(
'/orderShare/editShare/'
+
addOrEdit
)
:
this
.
$router
.
push
(
'/orderShare/editShare/'
+
addOrEdit
+
'/'
+
row
.
id
)
},
handleDelete
(
row
)
{
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
this
.
$confirm
(
'是否确认删除该专区?'
,
'删除'
,
{
this
.
$confirm
(
txt
,
title
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
callback
:
action
=>
{
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
if
(
action
==
'confirm'
)
{
// this.$apis.zoneList.deleteZoneApi({ id: row.id }).then(res => {
this
.
$apis
[
apiModule
][
apiName
](
apiParams
).
then
(
res
=>
{
// this.$message({
this
.
$message
({
// message: res.code == '0' ? '操作成功' : res.message,
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
// type: res.code == '0' ? 'success' : 'error'
type
:
res
.
code
==
'0'
?
'success'
:
'error'
// })
})
// if (res.code == '0') {
if
(
res
.
code
==
'0'
)
{
// this.handleSearch()
fn
&&
fn
()
// }
this
.
handleSearch
()
// })
}
})
}
}
}
}
})
})
},
},
// 1-新增;2-编辑
handleEdit
(
addOrEdit
,
row
)
{
addOrEdit
==
1
?
this
.
$router
.
push
(
'/orderShare/editShare/'
+
addOrEdit
)
:
this
.
$router
.
push
(
'/orderShare/editShare/'
+
addOrEdit
+
'/'
+
row
.
id
)
},
// 撤回
handleRevoke
(
row
)
{
this
.
secondConfirm
(
'撤回'
,
'是否确认撤回该晒单?'
,
'orderShare'
,
'revokeShareRecordApi'
,
{
id
:
row
.
id
})
},
handleDelete
(
row
)
{
this
.
secondConfirm
(
'删除'
,
'是否确认删除该晒单?'
,
'orderShare'
,
'deleteShareRecordApi'
,
{
id
:
row
.
id
})
},
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
if
(
refreshSigle
)
{
...
...
src/views/zoneList/index.vue
View file @
80dd7a6
...
@@ -108,24 +108,21 @@ export default {
...
@@ -108,24 +108,21 @@ export default {
resolve
()
resolve
()
})
})
},
},
// 1-新增;2-编辑
handleEdit
(
addOrEdit
,
row
)
{
addOrEdit
==
1
?
this
.
$router
.
push
(
'/zoneList/editZone/'
+
addOrEdit
)
:
this
.
$router
.
push
(
'/zoneList/editZone/'
+
addOrEdit
+
'/'
+
row
.
id
)
},
handleDelete
(
row
)
{
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
this
.
$confirm
(
'是否确认删除该专区?'
,
'删除'
,
{
this
.
$confirm
(
txt
,
title
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
callback
:
action
=>
{
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
if
(
action
==
'confirm'
)
{
this
.
$apis
.
zoneList
.
deleteZoneApi
({
id
:
row
.
id
}
).
then
(
res
=>
{
this
.
$apis
[
apiModule
][
apiName
](
apiParams
).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
})
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
fn
&&
fn
()
this
.
handleSearch
()
this
.
handleSearch
()
}
}
})
})
...
@@ -133,6 +130,14 @@ export default {
...
@@ -133,6 +130,14 @@ export default {
}
}
})
})
},
},
// 1-新增;2-编辑
handleEdit
(
addOrEdit
,
row
)
{
addOrEdit
==
1
?
this
.
$router
.
push
(
'/zoneList/editZone/'
+
addOrEdit
)
:
this
.
$router
.
push
(
'/zoneList/editZone/'
+
addOrEdit
+
'/'
+
row
.
id
)
},
handleDelete
(
row
)
{
this
.
secondConfirm
(
'删除'
,
'是否确认删除该专区?'
,
'zoneList'
,
'deleteZoneApi'
,
{
id
:
row
.
id
})
},
handleSearch
()
{
handleSearch
()
{
this
.
$refs
.
zoneRef
.
refreshTable
()
this
.
$refs
.
zoneRef
.
refreshTable
()
...
...
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