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 012adecf
authored
Apr 23, 2024
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复
1 parent
c05d5353
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
94 deletions
src/views/systemConfig/ShopConfig/shopSet.vue
src/views/systemConfig/ShopConfig/shopSet.vue
View file @
012adec
...
...
@@ -6,7 +6,7 @@
:model=
"form"
:rules=
"formRules"
label-width=
"130px"
v-loading=
"$store.state.d2admin.loading.value"
>
>
<p
class=
"edit-sub-title"
>
店铺设置
<span
class=
"merchantName"
>
{{
info
.
merchantName
}}
{{
info
.
merchantId
}}
</span>
...
...
@@ -374,33 +374,6 @@ export default {
}
},
watch
:
{
sellerMerchantStaffList
:
{
handler
()
{
this
.
checkSelectOption
()
},
deep
:
true
},
serviceBossList
:
{
handler
()
{
this
.
checkSelectOption
()
},
deep
:
true
},
supervisionOptionsList
:
{
handler
()
{
this
.
checkSelectOption
()
},
deep
:
true
},
residentManagerOptionsList
:
{
handler
()
{
this
.
checkSelectOption
()
},
deep
:
true
},
},
components
:
{},
computed
:
{},
...
...
@@ -412,12 +385,12 @@ export default {
this
.
nowMoth
=
nowDate
.
getMonth
()
+
1
this
.
nowDay
=
nowDate
.
getDate
()
this
.
info
=
this
.
$route
.
params
?.
info
await
this
.
getShopSetting
(
this
.
info
)
await
this
.
findMerchantStaffList
()
await
this
.
merchantStaffByRoleList
()
await
this
.
getSelectList
(
this
.
info
)
await
this
.
listByMerchantIdAndYear
(
this
.
year
)
await
this
.
findSellerMerchantStaffList
()
await
this
.
getShopSetting
(
this
.
info
)
},
methods
:
{
...
...
@@ -431,31 +404,35 @@ export default {
// 获取店铺设置信息
async
getShopSetting
(
info
)
{
const
{
merchantId
}
=
info
getShopSetting
({
merchantId
}).
then
(
res
=>
{
// this.setInfo = res
this
.
form
=
deepClone
(
res
)
if
(
!
this
.
form
.
serviceMerchantServiceChargeConfig
)
{
// 未设置过时,手续费默认为打开并且费率为2
this
.
form
.
serviceMerchantServiceChargeConfig
=
{
passageServiceCharge
:
2
,
passageServiceChargeFlag
:
'Y'
,
gasCardServiceCharge
:
2
,
gasCardServiceChargeFlag
:
'Y'
}
}
if
(
!
this
.
form
.
shopMerchantConfig
)
{
this
.
form
.
shopMerchantConfig
=
{
boutiqueDirectorUserId
:
''
,
quotationDirectorUserId
:
''
,
boutiqueSunshineInspiration
:
''
,
quotationSunshineInspiration
:
''
,
boutiqueMarketInspiration
:
''
,
quotationMarketInspiration
:
''
,
boutiqueServiceDirectorUserId
:
''
,
quotationServiceDirectorUserId
:
''
}
}
// 对比下拉框是否存在已选的选择项 不存在清空
// this.checkSelectOption()
console
.
log
(
this
.
form
)
if
(
this
.
form
.
list
&&
this
.
form
.
list
.
length
>
0
)
{
this
.
form
.
list
=
this
.
form
.
list
.
map
(
item
=>
{
const
item_new
=
{
id
:
item
.
id
,
merchantName
:
item
.
subMerchantName
,
merchantNo
:
item
.
subMerchantId
}
this
.
options
.
push
(
item_new
)
return
item_new
})
}
return
new
Promise
((
resolve
,
reject
)
=>
{
getShopSetting
({
merchantId
}).
then
(
res
=>
{
// this.setInfo = res
this
.
form
=
deepClone
(
res
)
if
(
!
this
.
form
.
serviceMerchantServiceChargeConfig
)
{
// 未设置过时,手续费默认为打开并且费率为2
this
.
form
.
serviceMerchantServiceChargeConfig
=
{
passageServiceCharge
:
2
,
passageServiceChargeFlag
:
'Y'
,
gasCardServiceCharge
:
2
,
gasCardServiceChargeFlag
:
'Y'
}
}
if
(
!
this
.
form
.
shopMerchantConfig
)
{
this
.
form
.
shopMerchantConfig
=
{
boutiqueDirectorUserId
:
''
,
quotationDirectorUserId
:
''
,
boutiqueSunshineInspiration
:
''
,
quotationSunshineInspiration
:
''
,
boutiqueMarketInspiration
:
''
,
quotationMarketInspiration
:
''
,
boutiqueServiceDirectorUserId
:
''
,
quotationServiceDirectorUserId
:
''
}
}
// 对比下拉框是否存在已选的选择项 不存在清空
this
.
checkSelectOption
()
console
.
log
(
this
.
form
)
if
(
this
.
form
.
list
&&
this
.
form
.
list
.
length
>
0
)
{
this
.
form
.
list
=
this
.
form
.
list
.
map
(
item
=>
{
const
item_new
=
{
id
:
item
.
id
,
merchantName
:
item
.
subMerchantName
,
merchantNo
:
item
.
subMerchantId
}
this
.
options
.
push
(
item_new
)
return
item_new
})
}
resolve
()
})
})
},
checkSelectOption
()
{
...
...
@@ -527,47 +504,57 @@ export default {
}
},
async
merchantStaffByRoleList
()
{
merchantStaffByRoleList
({
roleName
:
'区域督导'
}).
then
((
result
)
=>
{
let
copyResult
=
deepClone
(
result
)
this
.
supervisionOptionsList
=
copyResult
.
map
((
item
)
=>
{
return
{
userType
:
1
,
userId
:
item
.
uuid
,
userName
:
item
.
staffName
,
userNum
:
item
.
staffPhone
}
return
new
Promise
((
resolve
,
reject
)
=>
{
merchantStaffByRoleList
({
roleName
:
'区域督导'
}).
then
((
result
)
=>
{
let
copyResult
=
deepClone
(
result
)
this
.
supervisionOptionsList
=
copyResult
.
map
((
item
)
=>
{
return
{
userType
:
1
,
userId
:
item
.
uuid
,
userName
:
item
.
staffName
,
userNum
:
item
.
staffPhone
}
})
resolve
()
})
})
},
// 获取全部员工 过滤出服务商负责人可选数据
async
findMerchantStaffList
()
{
findMerchantStaffList
({
merchantId
:
-
1
}).
then
(
res
=>
{
// 服务商负责人(根据角色名过滤)
let
arr
=
[]
res
?.
map
(
val
=>
{
if
(
val
.
roleName
==
baseConfig
.
roleName
)
arr
.
push
({
userId
:
val
.
uuid
,
userName
:
val
.
staffName
return
new
Promise
((
resolve
,
reject
)
=>
{
findMerchantStaffList
({
merchantId
:
-
1
}).
then
(
res
=>
{
// 服务商负责人(根据角色名过滤)
let
arr
=
[]
res
?.
map
(
val
=>
{
if
(
val
.
roleName
==
baseConfig
.
roleName
)
arr
.
push
({
userId
:
val
.
uuid
,
userName
:
val
.
staffName
})
})
this
.
serviceBossList
=
arr
resolve
()
})
this
.
serviceBossList
=
arr
})
},
// 根据4s店或者园区店查询员工信息
async
getSelectList
(
info
)
{
const
{
merchantId
}
=
info
// 取园区店下所有员工 0422版本 刘世权更改
getResidentStaffList
({
merchantId
}).
then
((
result
)
=>
{
this
.
residentManagerOptionsList
=
result
.
map
((
item
)
=>
{
return
{
userType
:
2
,
userId
:
item
.
staffUuid
,
userName
:
item
.
staffName
,
userNum
:
item
.
staffPhone
}
return
new
Promise
((
resolve
,
reject
)
=>
{
getResidentStaffList
({
merchantId
}).
then
((
result
)
=>
{
this
.
residentManagerOptionsList
=
result
.
map
((
item
)
=>
{
return
{
userType
:
2
,
userId
:
item
.
staffUuid
,
userName
:
item
.
staffName
,
userNum
:
item
.
staffPhone
}
})
resolve
()
})
console
.
log
(
this
.
residentManagerOptionsList
,
'======'
)
})
},
chooseYear
()
{
this
.
listByMerchantIdAndYear
(
this
.
year
)
...
...
@@ -575,15 +562,18 @@ export default {
// 根据年份获取产值列表
async
listByMerchantIdAndYear
(
year
)
{
const
{
merchantId
}
=
this
.
info
listByMerchantIdAndYear
({
yearStr
:
year
,
merchantId
:
merchantId
}).
then
((
result
)
=>
{
this
.
outputValueListByYear
=
result
||
[]
if
(
this
.
outputValueListByYear
&&
this
.
outputValueListByYear
.
length
>
0
)
{
this
.
outputValueListByYear
=
this
.
outputValueListByYear
.
map
(
item
=>
{
const
_flag
=
this
.
setInputDisabled
(
item
)
item
.
isDisabled
=
_flag
return
item
})
}
return
new
Promise
((
resolve
,
reject
)
=>
{
listByMerchantIdAndYear
({
yearStr
:
year
,
merchantId
:
merchantId
}).
then
((
result
)
=>
{
this
.
outputValueListByYear
=
result
||
[]
if
(
this
.
outputValueListByYear
&&
this
.
outputValueListByYear
.
length
>
0
)
{
this
.
outputValueListByYear
=
this
.
outputValueListByYear
.
map
(
item
=>
{
const
_flag
=
this
.
setInputDisabled
(
item
)
item
.
isDisabled
=
_flag
return
item
})
}
resolve
()
})
})
},
// 产值输入框输入限制
...
...
@@ -772,12 +762,15 @@ export default {
},
async
findSellerMerchantStaffList
()
{
findSellerMerchantStaffList
({}).
then
((
result
)
=>
{
this
.
sellerMerchantStaffList
=
result
.
map
((
item
)
=>
{
return
{
userId
:
item
.
uuid
,
userName
:
item
.
staffName
}
return
new
Promise
((
resolve
,
reject
)
=>
{
findSellerMerchantStaffList
({}).
then
((
result
)
=>
{
this
.
sellerMerchantStaffList
=
result
.
map
((
item
)
=>
{
return
{
userId
:
item
.
uuid
,
userName
:
item
.
staffName
}
})
resolve
()
})
})
}
...
...
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