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 d191d290
authored
Apr 12, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
服务商-关联和删除服务商
1 parent
5ef628c7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
181 additions
and
9 deletions
src/components/d2-search/index.vue
src/views/systemConfig/merchant/merchantManage.vue
src/views/systemConfig/serviceManage.vue
src/components/d2-search/index.vue
View file @
d191d29
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
v-model=
"searchForm[item.name]"
v-model=
"searchForm[item.name]"
:disabled=
"item.isDisabled"
:disabled=
"item.isDisabled"
:clearable=
"item.isClear || false"
:clearable=
"item.isClear || false"
:type=
"item.inputType || 'text'"
@
keydown
.
native=
"e => handleInputDown(e, item)"
@
keydown
.
native=
"e => handleInputDown(e, item)"
></el-input>
></el-input>
<!-- 选择框 -->
<!-- 选择框 -->
...
@@ -128,4 +129,12 @@ export default {
...
@@ -128,4 +129,12 @@ export default {
.d2-search
.item-height
{
.d2-search
.item-height
{
height
:
37px
;
height
:
37px
;
}
}
.d2-search
input
::-webkit-outer-spin-button
,
.d2-search
input
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
!important
;
}
.d2-search
input
[
type
=
'number'
]
{
-moz-appearance
:
textfield
!important
;
}
</
style
>
</
style
>
src/views/systemConfig/merchant/merchantManage.vue
View file @
d191d29
...
@@ -261,7 +261,6 @@ export default {
...
@@ -261,7 +261,6 @@ export default {
mounted
()
{
mounted
()
{
this
.
userInfo
.
beSuper
&&
getParkStore
({}).
then
(
res
=>
{
this
.
userInfo
.
beSuper
&&
getParkStore
({}).
then
(
res
=>
{
this
.
parkServiceList
=
res
this
.
parkServiceList
=
res
console
.
log
(
res
)
})
})
this
.
getBaseData
()
this
.
getBaseData
()
this
.
userTypeList
=
_
.
cloneDeep
(
userTypeList
).
filter
(
item
=>
item
.
confLabel
!==
'员工'
)
this
.
userTypeList
=
_
.
cloneDeep
(
userTypeList
).
filter
(
item
=>
item
.
confLabel
!==
'员工'
)
...
...
src/views/systemConfig/serviceManage.vue
View file @
d191d29
...
@@ -43,6 +43,87 @@
...
@@ -43,6 +43,87 @@
></auth-button>
></auth-button>
</d2-table>
</d2-table>
</div>
</div>
<!-- 新增服务商 -->
<d2-dialog
title=
"关联服务商"
:isVisible
.
sync=
"relateVisible"
btnOkLabel=
"确定关联"
width=
"60%"
@
confirmDialog=
"handleRelateConfirm"
@
closeDialog=
"handleRelateClose"
>
<el-form
ref=
"relateDialog"
:model=
"relateForm"
:rules=
"relateRule"
label-width=
"150px"
>
<el-form-item
label=
"选择关联的园区店:"
prop=
"yqMerchantId"
>
<el-select
v-model=
"relateForm.yqMerchantId"
>
<el-option
v-for=
"item in baseData.parkServiceList.filter(i => i.merchantName !== '全部')"
:key=
"item.merchantId"
:value=
"item.merchantId"
:label=
"item.merchantName"
></el-option>
</el-select>
<span
class=
"relate-dialog-tips"
>
您选择的园区店编号:
{{
relateForm
.
yqMerchantId
}}
</span>
</el-form-item>
<el-form-item
label=
"选择关联的服务商:"
prop=
"yqMerchantId"
>
<el-select
v-model=
"relateForm.merchantId"
>
<el-option
v-for=
"item in baseData.parkServiceList.filter(i => i.merchantName !== '全部')"
:key=
"item.merchantId"
:value=
"item.merchantId"
:label=
"item.merchantName"
></el-option>
</el-select>
<span
class=
"relate-dialog-tips"
>
您选择的服务商编号:
{{
relateForm
.
merchantId
}}
</span>
</el-form-item>
</el-form>
</d2-dialog>
<!-- 删除服务商 -->
<d2-dialog
title=
"删除服务商"
:isVisible
.
sync=
"deleteVisible"
width=
"750px"
class=
"delete-dialog"
@
confirmDialog=
"handleDeleteConfirm"
@
closeDialog=
"handleDeleteClose"
>
<p
class=
"delete-title"
>
删除园区店和服务商的关联记录,会同步暂停该园区店跟该服务商的分润,是否继续删除?
</p>
<el-form
ref=
"deleteDialog"
:model=
"deleteForm"
:rules=
"deleteRule"
label-width=
"150px"
>
<el-form-item
label=
"管理员手机验证:"
>
{{
adminInfo
.
name
}}
{{
adminInfo
.
phone
}}
<el-button
size=
"small"
@
click=
"handleSend"
:disabled=
"isSend"
>
{{
isSend
?
sendMsg
+
'秒后,重试'
:
'发送验证短信'
}}
</el-button>
</el-form-item>
<el-form-item
label=
"验证码:"
prop=
"smsCode"
>
<el-input
placeholder=
"请填写验证码"
v-model=
"deleteForm.smsCode"
>
</el-input>
</el-form-item>
</el-form>
</d2-dialog>
</d2-container>
</d2-container>
</
template
>
</
template
>
...
@@ -51,6 +132,8 @@ import { Util } from '@/common/util'
...
@@ -51,6 +132,8 @@ import { Util } from '@/common/util'
import
{
getList
}
from
'@api/serviceManage'
import
{
getList
}
from
'@api/serviceManage'
import
{
mapActions
}
from
'vuex'
import
{
mapActions
}
from
'vuex'
import
{
BaseData
}
from
'@/common/constants.js'
import
{
BaseData
}
from
'@/common/constants.js'
import
{
sendSms
,
getAdminInfo
}
from
'@api/merchant'
import
{
getParkStore
}
from
'@api/editCustomer'
export
default
{
export
default
{
name
:
'serviceManage'
,
name
:
'serviceManage'
,
data
()
{
data
()
{
...
@@ -69,6 +152,7 @@ export default {
...
@@ -69,6 +152,7 @@ export default {
label
:
'商户号'
,
label
:
'商户号'
,
name
:
''
,
name
:
''
,
type
:
'input'
,
type
:
'input'
,
inputType
:
'number'
,
placeholder
:
'请输入服务商/4S店编号'
,
placeholder
:
'请输入服务商/4S店编号'
,
isClear
:
true
,
isClear
:
true
,
keyFn
:
this
.
keyDowmGetList
keyFn
:
this
.
keyDowmGetList
...
@@ -109,7 +193,28 @@ export default {
...
@@ -109,7 +193,28 @@ export default {
}
}
}]
}]
},
},
// 关联服务商
relateVisible
:
false
,
relateForm
:
{},
relateRule
:
{
yqMerchantId
:
[{
required
:
true
,
message
:
'请选择园区店'
,
trigger
:
'change'
}],
merchantId
:
[{
required
:
true
,
message
:
'请选择服务商'
,
trigger
:
'change'
}]
},
// 删除服务商
deleteVisible
:
false
,
deleteForm
:
{},
deleteRule
:
{
smsCode
:
[{
required
:
true
,
message
:
'请输入验证码'
,
trigger
:
'change'
}]
},
isSend
:
false
,
sendMsg
:
'发送验证短信'
,
time
:
''
,
adminInfo
:
{
name
:
''
,
phone
:
''
},
baseData
:
{
baseData
:
{
parkServiceList
:
[],
channelType
:
[]
channelType
:
[]
}
}
}
}
...
@@ -118,11 +223,14 @@ export default {
...
@@ -118,11 +223,14 @@ export default {
components
:
{
components
:
{
},
},
created
()
{
this
.
getBaseData
()
},
mounted
()
{
mounted
()
{
this
.
getBaseData
()
getParkStore
({}).
then
(
res
=>
{
this
.
baseData
.
parkServiceList
=
res
})
getAdminInfo
({}).
then
(
res
=>
{
this
.
adminInfo
=
res
})
},
},
methods
:
{
methods
:
{
...
@@ -144,14 +252,70 @@ export default {
...
@@ -144,14 +252,70 @@ export default {
merchantName
:
''
merchantName
:
''
}
}
},
},
handleRelate
()
{
},
// 新增服务商
handleRelate
()
{
this
.
handleRelateClose
()
},
handleRelateClose
()
{
this
.
relateVisible
=
!
this
.
relateVisible
this
.
relateForm
=
{}
this
.
$refs
.
relateDialog
&&
this
.
$refs
.
relateDialog
.
resetFields
()
},
handleRelateConfirm
()
{
this
.
$refs
.
relateDialog
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
handleRelateClose
()
}
})
},
// 删除服务商
handleDelete
(
row
)
{
handleDelete
(
row
)
{
console
.
log
(
row
)
// console.log(row)
this
.
handleDeleteClose
()
},
handleDeleteClose
()
{
this
.
deleteVisible
=
!
this
.
deleteVisible
this
.
deleteForm
=
{}
this
.
isSend
=
false
this
.
time
&&
clearTimeout
(
this
.
time
)
this
.
$refs
.
deleteDialog
&&
this
.
$refs
.
deleteDialog
.
resetFields
()
},
handleDeleteConfirm
()
{
this
.
$refs
.
deleteDialog
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
handleDeleteClose
()
}
})
},
handleSend
()
{
sendSms
({}).
then
((
res
)
=>
{
this
.
notice
.
okTips
(
'已发送,30分钟内有效'
)
this
.
isSend
=
true
this
.
sendMsg
=
60
this
.
msgDown
()
})
},
msgDown
()
{
this
.
time
=
setTimeout
(()
=>
{
clearTimeout
(
this
.
time
)
if
(
this
.
sendMsg
>
1
)
{
--
this
.
sendMsg
this
.
msgDown
()
}
else
{
this
.
isSend
=
false
}
},
1000
)
}
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
scoped
>
.relate-dialog-tips
{
display
:
inline-block
;
margin-left
:
20px
;
}
.delete-dialog
.delete-title
{
font-size
:
16px
;
}
</
style
>
</
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