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
fa9b3528
Commit
fa9b3528
authored
Aug 12, 2021
by
liwenhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:回滚分销代码
parent
6f23cb55
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
41 deletions
+23
-41
index.vue
src/pages/Goods/Detail/index.vue
+19
-22
index.vue
src/pages/Goods/Retail/index.vue
+4
-19
No files found.
src/pages/Goods/Detail/index.vue
View file @
fa9b3528
...
@@ -381,14 +381,6 @@
...
@@ -381,14 +381,6 @@
></el-input>
></el-input>
<span
v-else
>
{{ goodsObj.original_price }}
</span>
<span
v-else
>
{{ goodsObj.original_price }}
</span>
</el-form-item>
</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>
<h4
style=
"margin:20px 0"
>
库存信息
</h4>
<el-form-item
label=
"剩余库存量:"
>
<el-form-item
label=
"剩余库存量:"
>
<span>
{{ goodsObj.inventory_rest }}
</span>
<span>
{{ goodsObj.inventory_rest }}
</span>
...
@@ -458,7 +450,7 @@
...
@@ -458,7 +450,7 @@
"
>
购买后不允许退款
</span>
"
>
购买后不允许退款
</span>
<span
v-else-if=
"
<span
v-else-if=
"
$route.params.operation !== 'EDIT' && goodsObj.rule_refund === 3
$route.params.operation !== 'EDIT' && goodsObj.rule_refund === 3
"
>
到期后不
允许
退款
</span>
"
>
到期后不退款
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"使用日期:"
>
<el-form-item
label=
"使用日期:"
>
<el-radio-group
<el-radio-group
...
@@ -745,9 +737,9 @@ export default {
...
@@ -745,9 +737,9 @@ export default {
rulesForm
:
{
rulesForm
:
{
// 退款选项
// 退款选项
rulesOptions
:
[
rulesOptions
:
[
{
value
:
1
,
label
:
"到期
后
自动退款"
},
{
value
:
1
,
label
:
"到期自动退款"
},
{
value
:
2
,
label
:
"购买后不允许退款"
},
{
value
:
2
,
label
:
"购买后不允许退款"
},
{
value
:
3
,
label
:
"到期后不
允许
退款"
}
{
value
:
3
,
label
:
"到期后不退款"
}
],
],
useStartTime
:
""
,
// 使用开始时间
useStartTime
:
""
,
// 使用开始时间
useEndTime
:
""
,
// 使用结束时间
useEndTime
:
""
,
// 使用结束时间
...
@@ -1175,14 +1167,23 @@ export default {
...
@@ -1175,14 +1167,23 @@ export default {
},
},
// 更改原价
// 更改原价
perPrice
(
val
)
{
perPrice
()
{
if
(
val
.
length
===
0
)
val
=
0
;
if
(
!
this
.
goodsObj
.
original_price
||
this
.
goodsObj
.
original_price
==
0
)
{
const
parseOriginalPrice
=
Number
(
val
).
toFixed
(
2
);
this
.
$nextTick
(()
=>
{
val
=
Number
(
parseOriginalPrice
);
this
.
goodsObj
.
original_price
=
""
;
if
(
typeof
val
===
"number"
&&
isNaN
(
val
))
{
})
val
=
0
;
return
this
.
$message
.
error
(
"原价价格必为数字"
);
}
}
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 = "";
// return this.$message.error("原价价格必为数字");
// }
},
},
// 审核通过
// 审核通过
...
@@ -1299,10 +1300,6 @@ export default {
...
@@ -1299,10 +1300,6 @@ export default {
}
}
console
.
log
(
query
);
console
.
log
(
query
);
// 是否该商品关联的分销活动满足售价-分销总金额>=结算价
// if (query.price - d >= query.clear_price) {
// return this.$message.error("请至少选择一个门店");
// }
const
res
=
await
editGoods
(
query
);
const
res
=
await
editGoods
(
query
);
if
(
res
.
code
!==
0
)
{
if
(
res
.
code
!==
0
)
{
...
...
src/pages/Goods/Retail/index.vue
View file @
fa9b3528
...
@@ -200,17 +200,6 @@
...
@@ -200,17 +200,6 @@
></el-input>
></el-input>
<div
style=
"margin: 20px 0"
></div>
<div
style=
"margin: 20px 0"
></div>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"commission_mode"
label=
"金额计算方式:"
>
<el-radio-group
v-model=
"ruleForm.commission_mode"
>
<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-form-item
label=
"上线佣金:"
prop=
"first_commission_value"
>
<el-input
<el-input
v-model=
"ruleForm.first_commission_value"
v-model=
"ruleForm.first_commission_value"
...
@@ -218,7 +207,7 @@
...
@@ -218,7 +207,7 @@
@
input=
"changeValue($event, 'first_commission_value')"
@
input=
"changeValue($event, 'first_commission_value')"
:disabled=
"shopStart !== 0"
:disabled=
"shopStart !== 0"
>
>
<
template
#
append
>
{{
ruleForm
.
commission_mode
==
1
?
'%'
:
'¥'
}}
</
template
>
<
template
#
append
>
%
</
template
>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"分享者佣金: "
prop=
"second_commission_value"
>
<el-form-item
label=
"分享者佣金: "
prop=
"second_commission_value"
>
...
@@ -228,7 +217,7 @@
...
@@ -228,7 +217,7 @@
@
input=
"changeValue($event, 'second_commission_value')"
@
input=
"changeValue($event, 'second_commission_value')"
:disabled=
"shopStart !== 0"
:disabled=
"shopStart !== 0"
>
>
<
template
#
append
>
{{
ruleForm
.
commission_mode
==
1
?
'%'
:
'¥'
}}
</
template
>
<
template
#
append
>
%
</
template
>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"活动生效时间:"
>
<el-form-item
label=
"活动生效时间:"
>
...
@@ -369,11 +358,10 @@ export default {
...
@@ -369,11 +358,10 @@ export default {
data
()
{
data
()
{
var
commission
=
(
rule
,
value
,
callback
)
=>
{
var
commission
=
(
rule
,
value
,
callback
)
=>
{
if
(
if
(
this
.
ruleForm
.
commission_mode
==
1
&&
this
.
ruleForm
.
first_commission_value
+
(
this
.
ruleForm
.
first_commission_value
+
this
.
ruleForm
.
second_commission_value
>
this
.
ruleForm
.
second_commission_value
>
50
||
50
||
value
>
50
)
value
>
50
)
{
)
{
callback
(
new
Error
(
"上线佣金与分享者佣金之和不可大于50%"
));
callback
(
new
Error
(
"上线佣金与分享者佣金之和不可大于50%"
));
}
else
{
}
else
{
...
@@ -410,7 +398,6 @@ export default {
...
@@ -410,7 +398,6 @@ export default {
ruleForm
:
{
ruleForm
:
{
marketing_name
:
""
,
marketing_name
:
""
,
commission_mode
:
1
,
first_commission_value
:
""
,
first_commission_value
:
""
,
second_commission_value
:
""
,
second_commission_value
:
""
,
start_time
:
""
,
start_time
:
""
,
...
@@ -619,7 +606,6 @@ export default {
...
@@ -619,7 +606,6 @@ export default {
let
{
let
{
marketing_name
,
marketing_name
,
first_commission_value
,
first_commission_value
,
commission_mode
,
second_commission_value
,
second_commission_value
,
}
=
this
.
ruleForm
;
}
=
this
.
ruleForm
;
let
[
start_time
,
end_time
]
=
this
.
timeSelect
||
[];
let
[
start_time
,
end_time
]
=
this
.
timeSelect
||
[];
...
@@ -634,7 +620,6 @@ export default {
...
@@ -634,7 +620,6 @@ export default {
}
}
let
addParams
=
{
let
addParams
=
{
goods_sku_id
,
goods_sku_id
,
commission_mode
,
marketing_name
,
marketing_name
,
first_commission_value
:
first_commission_value
+
""
,
first_commission_value
:
first_commission_value
+
""
,
second_commission_value
:
second_commission_value
+
""
,
second_commission_value
:
second_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