Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-shop
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 672de5e6
authored
Aug 28, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
第一轮bug修复
1 parent
566d1186
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
30 deletions
src/views/staffManage/edit.vue
src/views/staffManage/explainDialog.vue
src/views/staffManage/index.vue
src/views/staffManage/edit.vue
View file @
672de5e
...
@@ -92,10 +92,10 @@
...
@@ -92,10 +92,10 @@
<el-row
slot
>
<el-row
slot
>
<el-form
:model=
"storeSearchForm"
ref=
"relate"
:inline=
"true"
label-width=
"90px"
>
<el-form
:model=
"storeSearchForm"
ref=
"relate"
:inline=
"true"
label-width=
"90px"
>
<el-form-item
label=
"门店名称:"
prop=
"merchantName"
>
<el-form-item
label=
"门店名称:"
prop=
"merchantName"
>
<el-input
:size=
"size"
v-model
.
trim=
"storeSearchForm.merchant
IdKeyword
"
placeholder=
"请输入门店名称"
clearable
></el-input>
<el-input
:size=
"size"
v-model
.
trim=
"storeSearchForm.merchant
Name
"
placeholder=
"请输入门店名称"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商户号:"
prop=
"merchant
Name
"
>
<el-form-item
label=
"商户号:"
prop=
"merchant
IdKeyword
"
>
<el-input
:size=
"size"
v-model
.
trim=
"storeSearchForm.merchant
Name
"
placeholder=
"请输入商户号"
clearable
></el-input>
<el-input
:size=
"size"
v-model
.
trim=
"storeSearchForm.merchant
IdKeyword
"
placeholder=
"请输入商户号"
clearable
></el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearchStore"
>
搜索
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearchStore"
>
搜索
</el-button>
...
@@ -410,13 +410,13 @@ export default {
...
@@ -410,13 +410,13 @@ export default {
},
},
'editForm.staffPhone'
:
{
'editForm.staffPhone'
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
editForm
.
staffPhone
=
val
.
replace
(
/
\D
+/g
,
''
)
this
.
editForm
.
staffPhone
=
val
.
replace
(
/
\D
+/g
,
''
)
}
}
},
},
'editForm.merchantNo'
:
{
'editForm.merchantNo'
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
storeSearchForm
.
yqMerchantId
=
val
this
.
storeSearchForm
.
yqMerchantId
=
val
this
.
editForm
.
merchantName
=
this
.
baseData
.
merchantList
.
length
>
0
&&
this
.
baseData
.
merchantList
.
filter
(
item
=>
item
.
yqMerchantId
==
val
)[
0
].
yqMerchantName
this
.
editForm
.
merchantName
=
this
.
baseData
.
merchantList
.
length
>
0
&&
this
.
baseData
.
merchantList
.
filter
(
item
=>
item
.
yqMerchantId
==
val
)[
0
].
yqMerchantName
}
}
},
},
'editForm.visualType'
:
{
'editForm.visualType'
:
{
...
@@ -427,7 +427,7 @@ export default {
...
@@ -427,7 +427,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
routeInfo
=
this
.
$route
.
query
this
.
routeInfo
=
JSON
.
parse
(
this
.
$route
.
query
.
obj
)
this
.
routeInfo
.
editType
!=
'add'
?
this
.
getInfo
()
:
''
this
.
routeInfo
.
editType
!=
'add'
?
this
.
getInfo
()
:
''
this
.
userInfo
=
this
.
$globalState
.
session
this
.
userInfo
=
this
.
$globalState
.
session
if
(
this
.
routeInfo
.
editType
==
'edit'
)
{
if
(
this
.
routeInfo
.
editType
==
'edit'
)
{
...
@@ -603,7 +603,7 @@ export default {
...
@@ -603,7 +603,7 @@ export default {
this
.
$apis
.
customer
.
getServiceCenterList
(
params
).
then
(
res
=>
{
this
.
$apis
.
customer
.
getServiceCenterList
(
params
).
then
(
res
=>
{
this
.
baseData
.
merchantList
=
res
this
.
baseData
.
merchantList
=
res
// 若当前服务商下仅有1个服务中心时默认自动选中该服务中心
// 若当前服务商下仅有1个服务中心时默认自动选中该服务中心
if
(
res
.
length
==
1
&&
this
.
routeInfo
.
editType
==
'add'
)
this
.
editForm
.
merchantNo
=
res
[
0
].
yqMerchantId
if
(
res
.
length
==
1
&&
this
.
routeInfo
.
editType
==
'add'
)
this
.
editForm
.
merchantNo
=
res
[
0
].
yqMerchantId
this
.
$utils
.
getOptionsList
(
this
,
'editFormData'
,
false
)
this
.
$utils
.
getOptionsList
(
this
,
'editFormData'
,
false
)
})
})
},
},
...
@@ -668,11 +668,11 @@ export default {
...
@@ -668,11 +668,11 @@ export default {
let
params
=
{}
let
params
=
{}
let
form1
=
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
()
let
form1
=
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
()
let
form2
=
this
.
$refs
.
editFormRef1
.
$refs
[
this
.
editChildRef
].
validate
()
let
form2
=
this
.
$refs
.
editFormRef1
.
$refs
[
this
.
editChildRef
].
validate
()
console
.
log
(
this
.
$refs
.
editFormRef2
)
console
.
log
(
this
.
$refs
.
editFormRef2
)
let
form3
=
this
.
$refs
.
editFormRef2
&&
this
.
$refs
.
editFormRef2
[
0
].
validate
()
let
form3
=
this
.
$refs
.
editFormRef2
&&
this
.
$refs
.
editFormRef2
[
0
].
validate
()
Promise
.
all
([
form1
,
form2
,
form3
])
Promise
.
all
([
form1
,
form2
,
form3
])
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
length
>=
2
)
{
if
(
res
.
length
>=
2
)
{
params
=
{
params
=
{
...
this
.
editForm
...
this
.
editForm
}
}
...
@@ -758,10 +758,9 @@ export default {
...
@@ -758,10 +758,9 @@ export default {
this
.
$refs
.
editFormMerchantRef
.
handleCurrentChange
(
1
)
this
.
$refs
.
editFormMerchantRef
.
handleCurrentChange
(
1
)
},
},
handleSearchReset
()
{
handleSearchReset
()
{
this
.
storeSearchForm
=
{
this
.
storeSearchForm
.
merchantName
=
''
,
merchantName
:
''
,
this
.
storeSearchForm
.
merchantIdKeyword
=
''
,
merchantId
:
''
}
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
editFormMerchantRef
.
handleCurrentChange
(
1
)
this
.
$refs
.
editFormMerchantRef
.
handleCurrentChange
(
1
)
})
})
...
@@ -792,6 +791,14 @@ export default {
...
@@ -792,6 +791,14 @@ export default {
margin-left
:
154px
;
margin-left
:
154px
;
margin-top
:
-22px
;
margin-top
:
-22px
;
}
}
/
deep
/
td
.el-table__cell
{
height
:
64px
;
}
/
deep
/
.el-form-item__error
{
padding-top
:
2px
;
z-index
:
9999999
;
position
:
static
;
}
}
}
.mt16
{
.mt16
{
...
...
src/views/staffManage/explainDialog.vue
View file @
672de5e
<
template
>
<
template
>
<GLDialog
:title=
"title"
mode=
"mid"
:visible
.
sync=
"isVisible"
okText=
"确定"
:before-close=
"handleClose"
<GLDialog
:title=
"title"
mode=
"mid"
:visible
.
sync=
"isVisible"
okText=
"确定"
:before-close=
"handleClose"
@
onOk=
"handleConfirm"
@
onCancel=
"handleClose"
>
@
onOk=
"handleConfirm"
@
onCancel=
"handleClose"
>
<div
class=
"explain-title"
>
示例规则定义
</div>
<div
class=
"explain-title"
>
示例规则定义
</div>
<p
class=
"business-info"
v-if=
"diffExplain == 'constructionBonus'"
>
升级订单施工奖励:70.00元;战败订单施工奖励:50.00元
</p>
<p
class=
"business-info"
v-if=
"diffExplain == 'constructionBonus'"
>
升级订单施工奖励:70.00元;战败订单施工奖励:50.00元
</p>
<GLTable
v-else
:tableData=
"tableData"
:tableParams=
"tableParams"
:hasPage=
"false"
></GLTable>
<GLTable
v-else
:tableData=
"tableData"
:tableParams=
"tableParams"
:hasPage=
"false"
></GLTable>
...
@@ -74,17 +73,23 @@ export default {
...
@@ -74,17 +73,23 @@ export default {
},
},
watch
:
{
watch
:
{
diffExplain
(
newVal
)
{
diffExplain
(
newVal
)
{
console
.
log
(
newVal
)
if
(
newVal
==
'successRateBonus'
)
{
if
(
newVal
==
'successRateBonus'
)
{
this
.
tableData
=
[
this
.
tableData
=
[
{
startValue
:
''
,
endValue
:
'80%'
,
calculateValue
:
0.0
0
},
{
startValue
:
''
,
endValue
:
'80%'
,
calculateValue
:
0.
0
},
{
startValue
:
'80.01%'
,
endValue
:
'90%'
,
calculateValue
:
1000.0
0
},
{
startValue
:
'80.01%'
,
endValue
:
'90%'
,
calculateValue
:
1000.
0
},
{
startValue
:
'90.01%'
,
endValue
:
''
,
calculateValue
:
2000.0
0
}
{
startValue
:
'90.01%'
,
endValue
:
''
,
calculateValue
:
2000.
0
}
]
]
}
else
{
}
else
if
(
newVal
==
'commissionBonus'
)
{
this
.
tableData
=
[
this
.
tableData
=
[
{
startValue
:
0.0
,
endValue
:
2000.0
,
calculateValue
:
'10%'
},
{
startValue
:
0.0
,
endValue
:
2000.0
,
calculateValue
:
'10%'
},
{
startValue
:
2000.01
,
endValue
:
''
,
calculateValue
:
'20%'
}
{
startValue
:
2000.01
,
endValue
:
''
,
calculateValue
:
'20%'
}
]
]
}
else
{
this
.
tableData
=
[
{
startValue
:
0.0
,
endValue
:
2000.0
,
calculateValue
:
0.0
},
{
startValue
:
2000.01
,
endValue
:
''
,
calculateValue
:
2000.01
}
]
}
}
if
(
newVal
==
'commissionBonus'
)
{
if
(
newVal
==
'commissionBonus'
)
{
this
.
tableParams
.
tableColumns
[
2
].
label
=
'提成比例'
this
.
tableParams
.
tableColumns
[
2
].
label
=
'提成比例'
...
...
src/views/staffManage/index.vue
View file @
672de5e
...
@@ -231,20 +231,13 @@ export default {
...
@@ -231,20 +231,13 @@ export default {
handleEditStaff
(
editType
,
row
)
{
handleEditStaff
(
editType
,
row
)
{
var
params
=
{
var
params
=
{
editType
:
editType
,
editType
:
editType
,
$title
:
encodeURI
(
editType
==
'add'
?
'新增员工'
:
'编辑员工'
)
}
}
editType
!=
'add'
&&
(
params
.
merchantInfo
=
row
)
editType
!=
'add'
&&
(
params
.
merchantInfo
=
row
)
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/staffManage/edit'
,
path
:
'/staffManage/edit'
,
query
:
params
})
},
handleDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'/customerManage/customerDetail'
,
query
:
{
query
:
{
$title
:
encodeURI
(
'查看销售顾问
'
),
$title
:
encodeURI
(
editType
==
'add'
?
'新增员工'
:
'编辑员工
'
),
detailInfo
:
row
obj
:
JSON
.
stringify
(
params
)
}
}
})
})
}
}
...
...
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