Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
aiot-develop-platform
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 b82f74ed
authored
Nov 11, 2020
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增服务4s店
1 parent
056477cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
6 deletions
src/api/serviceStore.js
src/components/d2-form/relateStoreDialog.vue
src/views/systemConfig/serviceStore.vue
src/api/serviceStore.js
View file @
b82f74e
...
...
@@ -18,3 +18,9 @@ export function serviceGetMerchantList(data) {
data
.
method
=
`
${
path
}
merchant.page`
return
request
(
data
)
}
// 新增商户门店
export
function
addServiceMerchant
(
data
)
{
data
.
method
=
`
${
path
}
servicemerchantref.add`
return
request
(
data
)
}
src/components/d2-form/relateStoreDialog.vue
View file @
b82f74e
...
...
@@ -9,6 +9,7 @@
@
closeDialog=
"handleRelateStoreClose"
class=
"relateStore"
>
<slot></slot>
<el-row>
<el-col
:span=
"12"
>
<el-table
...
...
@@ -24,7 +25,11 @@
type=
"selection"
width=
"55"
align=
"center"
:selectable=
"selectable"
></el-table-column>
<!--
<el-table-column>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
beServed
}}
</
template
>
</el-table-column>
-->
<el-table-column
prop=
"merchantName"
label=
"门店名称"
...
...
@@ -85,6 +90,10 @@ export default {
storeSelected
:
{
type
:
Array
,
default
:
()
=>
[]
},
storeSearchForm
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
...
...
@@ -94,6 +103,9 @@ export default {
},
methods
:
{
selectable
(
row
,
index
)
{
return
row
.
hasOwnProperty
(
'beServed'
)
?
!
row
.
beServed
:
true
},
recoverySelection
()
{
var
exitIds
=
this
.
selectedData
.
map
(
item
=>
item
.
merchantId
)
this
.
selectingData
.
forEach
(
item
=>
{
...
...
@@ -102,9 +114,11 @@ export default {
},
getSelectingList
()
{
this
.
storeApi
({
...
this
.
storeSearchForm
,
currentPage
:
this
.
currentPage
,
pageSize
:
this
.
pageSize
}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
selectingData
=
res
.
list
this
.
total
=
res
.
total
this
.
$nextTick
(()
=>
{
...
...
src/views/systemConfig/serviceStore.vue
View file @
b82f74e
<!-- 服务4S店 -->
<
template
>
<d2-container
class=
"
commodity
"
>
<d2-container
class=
"
service-store
"
>
<el-form
:inline=
"true"
v-model=
"searchForm"
...
...
@@ -40,17 +40,46 @@
</d2-table>
<relate-store-dialog
v-if=
"relateStoreVisible"
ref=
"relateStore"
:relateStoreVisible=
"relateStoreVisible"
:storeApi=
"storeApi"
:storeSearchForm=
"storeSearchForm"
:storeSelected=
"storeSelected"
@
handleRelateStoreConfirm=
"handleRelateStoreConfirm"
@
handleRelateStoreClose=
"handleRelateStoreClose"
></relate-store-dialog>
>
<el-row
slot
>
<el-col
class=
"service-search"
:span=
"6"
>
<el-select
v-model=
"storeSearchForm.channelType"
>
<el-option
v-for=
"item in baseData.channelType"
:key=
"item.value"
:label=
"item.name"
:value=
"item.value"
></el-option>
</el-select>
</el-col>
<el-col
:span=
"8"
>
<el-input
v-model=
"storeSearchForm.merchantIdName"
placeholder=
"支持按门店、商户号搜索"
clearable
></el-input>
</el-col>
<el-button
type=
"primary"
@
click=
"handleSearchStore"
>
搜索
</el-button>
</el-row>
</relate-store-dialog>
</d2-container>
</
template
>
<
script
>
import
{
getList
,
deleteMerchant
,
serviceGetMerchantList
}
from
'@api/serviceStore'
import
{
getList
,
deleteMerchant
,
serviceGetMerchantList
,
addServiceMerchant
}
from
'@api/serviceStore'
import
{
mapActions
}
from
'vuex'
import
{
BaseData
,
userType
,
ghUserType
}
from
'@/common/constants.js'
export
default
{
...
...
@@ -107,6 +136,10 @@ export default {
}]
},
// 关联门店
storeSearchForm
:
{
channelType
:
1
,
merchantIdName
:
''
},
relateStoreVisible
:
false
,
storeApi
:
serviceGetMerchantList
,
storeSelected
:
[],
...
...
@@ -145,14 +178,27 @@ export default {
// console.log(form)
this
.
relateStoreVisible
=
true
},
relateCloseReset
()
{
this
.
storeSearchForm
=
{
channelType
:
1
,
merchantIdName
:
''
}
},
handleRelateStoreConfirm
()
{
this
.
relateStoreVisible
=
false
addServiceMerchant
({}).
then
(
res
=>
{
this
.
relateStoreVisible
=
false
this
.
relateCloseReset
()
})
},
handleRelateStoreClose
()
{
this
.
relateStoreVisible
=
false
this
.
relateCloseReset
()
},
handleSearchStore
()
{
this
.
$refs
.
relateStore
.
getSelectingList
()
},
handleDelete
(
row
)
{
console
.
log
(
row
)
//
console.log(row)
this
.
$confirm
(
'是否要进行删除操作?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -170,5 +216,8 @@ export default {
}
</
script
>
<
style
scoped
>
<
style
>
.service-store
.service-search
{
margin-bottom
:
10px
;
}
</
style
>
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