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 bbba99be
authored
Mar 24, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商户管理-财务-激励费
1 parent
3896f360
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
17 deletions
src/views/systemConfig/merchantDetail.vue
src/views/systemConfig/merchantDetail.vue
View file @
bbba99b
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
prop=
"incentiveValue"
prop=
"incentiveValue"
:rules=
"[
{ required: true, message: '请输入激励费', trigger: 'change'}
, { pattern: /^(([1-9][0-9])|[0-9])$/, message: '请输入小于100正整数', trigger: 'blur' }
]"
:rules=
"[
{ required: true, message: '请输入激励费', trigger: 'change'}]"
>
>
<span
<span
class=
"tips-block"
class=
"tips-block"
...
@@ -276,12 +276,29 @@
...
@@ -276,12 +276,29 @@
size=
"small"
size=
"small"
v-show=
"isFirstSetEdit"
v-show=
"isFirstSetEdit"
v-model=
"accountSetForm.incentiveValue"
v-model=
"accountSetForm.incentiveValue"
placeholder=
"请输入阳光激励费"
class=
"input-with-select"
@
input=
"handleincentiveValue"
>
>
<el-select
slot=
"prepend"
style=
"width: 75px;"
v-model=
"accountSetForm.incentiveType"
@
change=
"handleChangeType"
>
<el-option
v-for=
"(item, index) in incentiveTypeList"
:key=
"index"
:value=
"item.confId"
:label=
"item.confLabel"
></el-option>
</el-select>
<i
<i
slot=
"suffix"
slot=
"suffix"
class=
"suffix"
class=
"suffix"
>
%
</i></el-input>
>
{{
accountSetForm
.
incentiveType
===
'1'
?
'%'
:
'元'
}}
</i>
<span
v-show=
"!isFirstSetEdit"
>
{{
accountSetForm
.
incentiveValue
?
(
accountSetForm
.
incentiveValue
+
'%'
)
:
''
}}
</span>
</el-input>
<span
v-show=
"!isFirstSetEdit"
>
{{
accountSetForm
.
incentiveValue
?
(
accountSetForm
.
incentiveValue
+
(
accountSetForm
.
incentiveType
===
'1'
?
'%'
:
'元'
))
:
''
}}
</span>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -434,9 +451,8 @@
...
@@ -434,9 +451,8 @@
<
script
>
<
script
>
import
_
from
'lodash'
import
_
from
'lodash'
import
{
mapActions
}
from
'vuex'
import
{
mapActions
}
from
'vuex'
// import { limitPrice } from '@/common/constants'
import
{
updateRule
,
sendSms
,
getAdminInfo
,
getAccountRule
}
from
'@api/merchant'
import
{
updateRule
,
sendSms
,
getAdminInfo
,
getAccountRule
}
from
'@api/merchant'
import
{
BaseData
,
userType
,
ghUserType
}
from
'@/common/constants.js'
import
{
BaseData
,
userType
,
ghUserType
,
limitPrice
}
from
'@/common/constants.js'
export
default
{
export
default
{
name
:
'merchantDetail'
,
name
:
'merchantDetail'
,
data
()
{
data
()
{
...
@@ -483,6 +499,7 @@ export default {
...
@@ -483,6 +499,7 @@ export default {
merchantProfitValue
:
''
merchantProfitValue
:
''
}),
}),
accountSetForm
:
{
accountSetForm
:
{
incentiveType
:
'1'
,
incentiveValue
:
''
,
incentiveValue
:
''
,
list
:
[{
list
:
[{
goodsType
:
'全部'
,
goodsType
:
'全部'
,
...
@@ -535,10 +552,10 @@ export default {
...
@@ -535,10 +552,10 @@ export default {
productTypeList
:
[],
productTypeList
:
[],
userType
:
userType
,
userType
:
userType
,
ghUserType
:
ghUserType
ghUserType
:
ghUserType
},
oldVal
:
{
incentiveValue
:
''
}
}
// oldVal: {
// incentiveValue: ''
// }
}
}
},
},
// watch: {
// watch: {
...
@@ -566,6 +583,7 @@ export default {
...
@@ -566,6 +583,7 @@ export default {
this
.
form
.
settleTime
=
res
.
settleTime
this
.
form
.
settleTime
=
res
.
settleTime
this
.
accountSetForm
.
list
[
0
].
merchantSettleType
=
res
.
merchantSettleType
+
''
this
.
accountSetForm
.
list
[
0
].
merchantSettleType
=
res
.
merchantSettleType
+
''
this
.
accountSetForm
.
list
[
0
].
merchantProfitValue
=
res
.
merchantProfitValue
+
''
this
.
accountSetForm
.
list
[
0
].
merchantProfitValue
=
res
.
merchantProfitValue
+
''
this
.
accountSetForm
.
incentiveType
=
res
.
incentiveType
+
''
this
.
accountSetForm
.
incentiveValue
=
res
.
incentiveValue
+
''
this
.
accountSetForm
.
incentiveValue
=
res
.
incentiveValue
+
''
this
.
accountSecondSetForm
.
list
[
0
].
partnerProfitPer
=
res
.
partnerProfitPer
+
''
this
.
accountSecondSetForm
.
list
[
0
].
partnerProfitPer
=
res
.
partnerProfitPer
+
''
res
.
goodsTypeSettleRuleList
.
forEach
((
item
,
index
)
=>
{
res
.
goodsTypeSettleRuleList
.
forEach
((
item
,
index
)
=>
{
...
@@ -631,14 +649,14 @@ export default {
...
@@ -631,14 +649,14 @@ export default {
handleSelectChange
(
value
,
index
,
currentItem
)
{
handleSelectChange
(
value
,
index
,
currentItem
)
{
this
[
currentItem
].
list
[
index
].
goodsTypeName
=
this
.
baseData
.
productTypeList
.
find
(
item
=>
item
.
goodsType
===
value
).
goodsTypeName
this
[
currentItem
].
list
[
index
].
goodsTypeName
=
this
.
baseData
.
productTypeList
.
find
(
item
=>
item
.
goodsType
===
value
).
goodsTypeName
},
},
//
handleincentiveValue(newVal) {
handleincentiveValue
(
newVal
)
{
// this.form.incentiveValue = this.form.incentiveType === 1
? limitPrice(newVal, this.oldVal.incentiveValue, 3, 0, 0, 100) : limitPrice(newVal, this.oldVal.incentiveValue, 6, 2)
this
.
accountSetForm
.
incentiveValue
=
this
.
accountSetForm
.
incentiveType
===
'1'
?
limitPrice
(
newVal
,
this
.
oldVal
.
incentiveValue
,
3
,
0
,
0
,
100
)
:
limitPrice
(
newVal
,
this
.
oldVal
.
incentiveValue
,
6
,
2
)
// this.oldVal.incentiveValue = this.f
orm.incentiveValue
this
.
oldVal
.
incentiveValue
=
this
.
accountSetF
orm
.
incentiveValue
//
},
},
//
handleChangeType() {
handleChangeType
()
{
// this.f
orm.incentiveValue = ''
this
.
accountSetF
orm
.
incentiveValue
=
''
//
this.oldVal.incentiveValue = ''
this
.
oldVal
.
incentiveValue
=
''
//
},
},
// 是否编辑;refs绑定的属性值;当前Form属性值;级联Form属性值;添加对象的属性
// 是否编辑;refs绑定的属性值;当前Form属性值;级联Form属性值;添加对象的属性
handleSetEdit
(
isEditAttr
,
refsAttr
,
formAttr
,
cascadeChangeAttr
,
addStructAttr
)
{
handleSetEdit
(
isEditAttr
,
refsAttr
,
formAttr
,
cascadeChangeAttr
,
addStructAttr
)
{
if
(
this
[
isEditAttr
])
{
if
(
this
[
isEditAttr
])
{
...
@@ -707,7 +725,7 @@ export default {
...
@@ -707,7 +725,7 @@ export default {
// 全部-分账设置
// 全部-分账设置
merchantSettleType
:
this
.
accountSetForm
.
list
[
0
].
merchantSettleType
,
merchantSettleType
:
this
.
accountSetForm
.
list
[
0
].
merchantSettleType
,
merchantProfitValue
:
this
.
accountSetForm
.
list
[
0
].
merchantProfitValue
,
merchantProfitValue
:
this
.
accountSetForm
.
list
[
0
].
merchantProfitValue
,
incentiveType
:
1
,
incentiveType
:
this
.
accountSetForm
.
incentiveType
,
incentiveValue
:
this
.
accountSetForm
.
incentiveValue
,
incentiveValue
:
this
.
accountSetForm
.
incentiveValue
,
partnerProfitPer
:
this
.
accountSecondSetForm
.
list
[
0
].
partnerProfitPer
,
partnerProfitPer
:
this
.
accountSecondSetForm
.
list
[
0
].
partnerProfitPer
,
goodsTypeSettleRuleList
:
[]
goodsTypeSettleRuleList
:
[]
...
...
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