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
cb103968
Commit
cb103968
authored
Aug 07, 2021
by
liwenhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:分销核算
parent
12ba2c1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
18 deletions
+35
-18
index.vue
src/pages/Goods/Detail/index.vue
+18
-13
index.vue
src/pages/Goods/Retail/index.vue
+17
-5
No files found.
src/pages/Goods/Detail/index.vue
View file @
cb103968
...
...
@@ -381,6 +381,14 @@
></el-input>
<span
v-else
>
{{ goodsObj.original_price }}
</span>
</el-form-item>
<el-form-item
label=
"结算价"
>
<el-input
v-if=
"$route.params.operation === 'EDIT'"
v-model=
"goodsObj.clear_price"
@
change=
"perPrice"
></el-input>
<span
v-else
>
{{ goodsObj.clear_price }}
</span>
</el-form-item>
<h4
style=
"margin:20px 0"
>
库存信息
</h4>
<el-form-item
label=
"剩余库存量:"
>
<span>
{{ goodsObj.inventory_rest }}
</span>
...
...
@@ -1157,19 +1165,12 @@ export default {
},
// 更改原价
perPrice
()
{
if
(
this
.
goodsObj
.
original_price
.
length
===
0
)
{
this
.
goodsObj
.
original_price
=
0
;
}
const
parseOriginalPrice
=
Number
(
this
.
goodsObj
.
original_price
).
toFixed
(
2
);
this
.
goodsObj
.
original_price
=
Number
(
parseOriginalPrice
);
if
(
typeof
this
.
goodsObj
.
original_price
===
"number"
&&
isNaN
(
this
.
goodsObj
.
original_price
)
)
{
this
.
goodsObj
.
original_price
=
0
;
perPrice
(
val
)
{
if
(
val
.
length
===
0
)
val
=
0
;
const
parseOriginalPrice
=
Number
(
val
).
toFixed
(
2
);
val
=
Number
(
parseOriginalPrice
);
if
(
typeof
val
===
"number"
&&
isNaN
(
val
))
{
val
=
0
;
return
this
.
$message
.
error
(
"原价价格必为数字"
);
}
},
...
...
@@ -1283,6 +1284,10 @@ export default {
}
console
.
log
(
query
);
// 是否该商品关联的分销活动满足售价-分销总金额>=结算价
// if (query.price - d >= query.clear_price) {
// return this.$message.error("请至少选择一个门店");
// }
const
res
=
await
editGoods
(
query
);
if
(
res
.
code
!==
0
)
{
...
...
src/pages/Goods/Retail/index.vue
View file @
cb103968
...
...
@@ -200,6 +200,17 @@
></el-input>
<div
style=
"margin: 20px 0"
></div>
</el-form-item>
<el-form-item
prop=
"commission_mode"
label=
"金额计算方式:"
>
<el-radio-group
v-model=
"countType"
>
<el-radio
:label=
"2"
>
按金额
</el-radio>
<el-radio
:label=
"1"
>
按比例
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"上线佣金:"
prop=
"first_commission_value"
>
<el-input
v-model=
"ruleForm.first_commission_value"
...
...
@@ -207,7 +218,7 @@
@
input=
"changeValue($event, 'first_commission_value')"
:disabled=
"shopStart !== 0"
>
<
template
#
append
>
%
</
template
>
<
template
#
append
>
{{
countType
==
1
?
'%'
:
'¥'
}}
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"分享者佣金: "
prop=
"second_commission_value"
>
...
...
@@ -217,7 +228,7 @@
@
input=
"changeValue($event, 'second_commission_value')"
:disabled=
"shopStart !== 0"
>
<
template
#
append
>
%
</
template
>
<
template
#
append
>
{{
countType
==
1
?
'%'
:
'¥'
}}
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"活动生效时间:"
>
...
...
@@ -358,10 +369,11 @@ export default {
data
()
{
var
commission
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
ruleForm
.
first_commission_value
+
this
.
countType
==
1
&&
(
this
.
ruleForm
.
first_commission_value
+
this
.
ruleForm
.
second_commission_value
>
50
||
value
>
50
value
>
50
)
)
{
callback
(
new
Error
(
"上线佣金与分享者佣金之和不可大于50%"
));
}
else
{
...
...
@@ -438,6 +450,7 @@ export default {
marketing_id
:
""
,
marketing_info
:
{},
disabled
:
false
,
countType
:
2
};
},
methods
:
{
...
...
@@ -603,7 +616,6 @@ export default {
this
.
ruleForm
.
goods_spu_id
&&
this
.
ruleForm
.
goods_spu_id
.
join
(
","
);
}
// console.log(goods_sku_id);
let
{
marketing_name
,
first_commission_value
,
...
...
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