Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
op-web-service
Commits
87ca1fc8
Commit
87ca1fc8
authored
Jul 09, 2021
by
蒙文昊
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pyq' into 'dev'
Pyq See merge request bp/op-web-service!9
parents
60b71f6c
69a54967
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
29 deletions
+40
-29
index.vue
src/pages/Goods/Retail/index.vue
+40
-29
No files found.
src/pages/Goods/Retail/index.vue
View file @
87ca1fc8
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
prop=
"
commission_mode
"
prop=
"
good_count
"
label=
"关联商品数"
label=
"关联商品数"
>
>
</el-table-column>
</el-table-column>
...
@@ -185,7 +185,8 @@
...
@@ -185,7 +185,8 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"一级佣金:"
prop=
"first_commission_value"
>
<el-form-item
label=
"一级佣金:"
prop=
"first_commission_value"
>
<el-input
<el-input
v-model
.
number=
"ruleForm.first_commission_value"
v-model=
"ruleForm.first_commission_value"
@
input=
"changeValue($event,'first_commission_value')"
:disabled=
"shopStart !== 0"
:disabled=
"shopStart !== 0"
>
>
<
template
#
append
>
%
</
template
>
<
template
#
append
>
%
</
template
>
...
@@ -193,7 +194,8 @@
...
@@ -193,7 +194,8 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"二级佣金: "
prop=
"second_commission_value"
>
<el-form-item
label=
"二级佣金: "
prop=
"second_commission_value"
>
<el-input
<el-input
v-model
.
number=
"ruleForm.second_commission_value"
v-model=
"ruleForm.second_commission_value"
@
input=
"changeValue($event,'second_commission_value')"
:disabled=
"shopStart !== 0"
:disabled=
"shopStart !== 0"
>
>
<
template
#
append
>
%
</
template
>
<
template
#
append
>
%
</
template
>
...
@@ -289,16 +291,17 @@
...
@@ -289,16 +291,17 @@
</div>
</div>
<
template
#
footer
>
<
template
#
footer
>
<span
class=
"dialog-footer"
>
<span
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"cancel"
style=
"width: 150px"
>
{{
shopStart
==
0
?
"取消"
:
"返回"
}}
</el-button>
<el-button
<el-button
type=
"primary"
type=
"primary"
@
click=
"addList"
@
click=
"addList"
style=
"width: 150px"
v-if=
"shopStart == 0"
v-if=
"shopStart == 0"
>
确 定
</el-button
style=
"width: 150px"
>
保存
</el-button
>
>
<!--
{{
shopStart
==
0
?
"返回"
:
"返回"
}}
-->
<el-button
type=
"primary"
@
click=
"cancel"
style=
"width: 150px"
>
返回
</el-button>
</span>
</span>
</
template
>
</
template
>
</el-dialog>
</el-dialog>
...
@@ -329,9 +332,14 @@ export default {
...
@@ -329,9 +332,14 @@ export default {
name
:
"GoodsRetail"
,
name
:
"GoodsRetail"
,
data
()
{
data
()
{
var
commission
=
(
rule
,
value
,
callback
)
=>
{
var
commission
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
ruleForm
.
first_commission_value
+
this
.
ruleForm
.
second_commission_value
>
50
||
value
>
50
)
{
if
(
this
.
ruleForm
.
first_commission_value
+
this
.
ruleForm
.
second_commission_value
>
50
||
value
>
50
)
{
callback
(
new
Error
(
"一级佣金与二级佣金之和不可大于50%"
));
callback
(
new
Error
(
"一级佣金与二级佣金之和不可大于50%"
));
}
else
{
}
else
{
callback
();
callback
();
}
}
};
};
...
@@ -376,25 +384,25 @@ export default {
...
@@ -376,25 +384,25 @@ export default {
life_account_id
:
""
,
life_account_id
:
""
,
goods_sku_id
:
""
,
goods_sku_id
:
""
,
start_time
:
""
,
start_time
:
""
,
end_time
:
""
end_time
:
""
,
},
},
rules
:
{
rules
:
{
marketing_name
:
[
marketing_name
:
[
{
required
:
true
,
message
:
"请输入活动名称"
,
trigger
:
"blur"
},
{
required
:
true
,
message
:
"请输入活动名称"
,
trigger
:
"blur"
},
{
min
:
1
,
max
:
50
,
message
:
"
长度在 50个字符内"
,
trigger
:
"blur"
}
{
min
:
1
,
max
:
50
,
message
:
"
活动名称不能大于50"
,
trigger
:
"blur"
},
],
],
first_commission_value
:
[
first_commission_value
:
[
{
{
required
:
true
,
required
:
true
,
message
:
"请填写一级佣金"
,
message
:
"请填写一级佣金"
,
trigger
:
"blur"
trigger
:
"blur"
,
},
},
{
type
:
"number"
,
message
:
"必须为数值型"
},
{
type
:
"number"
,
message
:
"必须为数值型"
},
{
validator
:
commission
}
{
validator
:
commission
}
,
],
],
second_commission_value
:
[
second_commission_value
:
[
{
type
:
"number"
,
message
:
"必须为数值型"
},
{
type
:
"number"
,
message
:
"必须为数值型"
},
{
validator
:
commission
}
{
validator
:
commission
}
,
],
],
},
},
allList
:
[],
allList
:
[],
...
@@ -404,10 +412,13 @@ export default {
...
@@ -404,10 +412,13 @@ export default {
endTime
:
""
,
endTime
:
""
,
marketing_id
:
""
,
marketing_id
:
""
,
marketing_info
:
{},
marketing_info
:
{},
disabled
:
false
disabled
:
false
,
};
};
},
},
methods
:
{
methods
:
{
changeValue
(
value
,
level
){
value
&&
value
.
indexOf
(
'.'
)
!==
value
.
length
-
1
&&
(
this
.
ruleForm
[
level
]
=
parseFloat
(
value
))
},
// 查看详情列表
// 查看详情列表
async
handleClick
(
row
)
{
async
handleClick
(
row
)
{
this
.
dialogFormVisible
=
true
;
this
.
dialogFormVisible
=
true
;
...
@@ -446,7 +457,7 @@ export default {
...
@@ -446,7 +457,7 @@ export default {
try
{
try
{
const
res
=
await
updateMarketingList
({
const
res
=
await
updateMarketingList
({
marketing_id
:
row
.
marketing_id
,
marketing_id
:
row
.
marketing_id
,
online_status
:
type
online_status
:
type
,
});
});
if
(
res
.
code
!==
0
)
{
if
(
res
.
code
!==
0
)
{
ElMessage
.
error
(
res
.
reason
);
ElMessage
.
error
(
res
.
reason
);
...
@@ -471,7 +482,7 @@ export default {
...
@@ -471,7 +482,7 @@ export default {
goods_sku_id
:
""
,
goods_sku_id
:
""
,
online_status
:
[],
online_status
:
[],
page
:
1
,
page
:
1
,
page_size
:
20
page_size
:
20
,
}),
}),
this
.
$refs
[
retailActivitie
].
resetFields
();
this
.
$refs
[
retailActivitie
].
resetFields
();
this
.
getMarketingList
({});
this
.
getMarketingList
({});
...
@@ -529,7 +540,7 @@ export default {
...
@@ -529,7 +540,7 @@ export default {
goods_sku_id
,
goods_sku_id
,
life_account_id
,
life_account_id
,
start_time
,
start_time
,
end_time
end_time
,
};
};
try
{
try
{
// 发请求
// 发请求
...
@@ -547,7 +558,7 @@ export default {
...
@@ -547,7 +558,7 @@ export default {
async
getAllList
()
{
async
getAllList
()
{
let
all
=
await
getMarketingList
({
let
all
=
await
getMarketingList
({
page
:
1
,
page
:
1
,
page_size
:
this
.
retailActivitie
.
count
page_size
:
this
.
retailActivitie
.
count
,
});
});
this
.
allList
=
all
.
result
;
this
.
allList
=
all
.
result
;
},
},
...
@@ -568,7 +579,7 @@ export default {
...
@@ -568,7 +579,7 @@ export default {
let
{
let
{
marketing_name
,
marketing_name
,
first_commission_value
,
first_commission_value
,
second_commission_value
second_commission_value
,
}
=
this
.
ruleForm
;
}
=
this
.
ruleForm
;
let
[
start_time
,
end_time
]
=
this
.
timeSelect
;
let
[
start_time
,
end_time
]
=
this
.
timeSelect
;
if
(
if
(
...
@@ -586,7 +597,7 @@ export default {
...
@@ -586,7 +597,7 @@ export default {
first_commission_value
,
first_commission_value
,
second_commission_value
,
second_commission_value
,
start_time
:
this
.
formatTime
(
start_time
),
start_time
:
this
.
formatTime
(
start_time
),
end_time
:
this
.
formatTime
(
end_time
)
end_time
:
this
.
formatTime
(
end_time
)
,
};
};
try
{
try
{
const
res
=
await
getAddMarketingList
(
addParams
);
const
res
=
await
getAddMarketingList
(
addParams
);
...
@@ -613,7 +624,7 @@ export default {
...
@@ -613,7 +624,7 @@ export default {
second_commission_value
:
""
,
second_commission_value
:
""
,
start_time
:
""
,
start_time
:
""
,
end_time
:
""
,
end_time
:
""
,
goods_sku_id
:
[]
goods_sku_id
:
[]
,
}),
}),
(
this
.
timeSelect
=
[]),
(
this
.
timeSelect
=
[]),
(
this
.
goods_list
=
[]),
(
this
.
goods_list
=
[]),
...
@@ -621,7 +632,7 @@ export default {
...
@@ -621,7 +632,7 @@ export default {
life_account_id
:
""
,
life_account_id
:
""
,
goods_sku_id
:
""
,
goods_sku_id
:
""
,
start_time
:
""
,
start_time
:
""
,
end_time
:
""
end_time
:
""
,
});
});
},
},
// 取消
// 取消
...
@@ -629,12 +640,12 @@ export default {
...
@@ -629,12 +640,12 @@ export default {
this
.
dialogFormVisible
=
false
;
this
.
dialogFormVisible
=
false
;
this
.
resetDate
();
this
.
resetDate
();
this
.
getMarketingList
();
this
.
getMarketingList
();
}
}
,
},
},
created
()
{
created
()
{
this
.
getMarketingList
();
this
.
getMarketingList
();
this
.
getAllList
();
this
.
getAllList
();
}
}
,
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment