Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
integral-mall
Overview
Overview
Details
Activity
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
integralMall
integral-mall
Commits
410b5a98
Commit
410b5a98
authored
Dec 24, 2021
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 完成
parent
ea9764e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
34 deletions
+58
-34
giftLadderPrice.vue
src/components/giftLadderPrice.vue
+56
-32
coupon.vue
src/views/goods/coupon/coupon.vue
+1
-1
gift.vue
src/views/goods/gift/gift.vue
+1
-1
No files found.
src/components/giftLadderPrice.vue
View file @
410b5a98
...
...
@@ -11,37 +11,61 @@
</div>
-->
<el-tabs
:value=
"selectTab"
type=
"border-card"
class=
"card-style"
>
<!--
<el-tab-pane
:name=
"index"
v-for=
"(item, index) in ladderMemberGrade"
:key=
"index"
:label=
"item.gradeName"
:value=
"item.gradeId"
>
-->
<el-tab-pane
:name=
"index"
v-for=
"(item, index) in list3"
:key=
"index"
:label=
"item.gradeName"
:value=
"item.gradeId"
>
<el-tab-pane
:name=
"index"
v-for=
"(item, index) in list3"
:key=
"index"
:label=
"item.gradeName"
:value=
"item.gradeId"
>
<div
class=
"fr"
style=
"margin-bottom:20px"
v-if=
"list3.length && isTable"
>
<el-input
class=
"w-100"
placeholder=
"请输入积分"
v-model=
"integral"
size=
"small"
></el-input>
<el-input
class=
"w-100"
placeholder=
"请输入金额"
v-model=
"cash"
size=
"small"
></el-input>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleLadder(list3[index].skuList)"
>
批量填充
</el-button>
<el-input
class=
"w-100"
placeholder=
"请输入积分"
v-model=
"integral"
size=
"small"
/>
<el-input
class=
"w-100"
placeholder=
"请输入金额"
v-model=
"cash"
size=
"small"
/>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleLadder(list3[index].skuList)"
>
批量填充
</el-button>
</div>
<el-table
v-if=
"list3.length && isTable"
:data=
"list3.length && isTable ? list3[index].skuList : []"
>
<el-table-column
v-for=
"(it, i) in skuHeaderList"
:key=
"i"
:label=
"it.proName"
>
<template
slot-scope=
"
{ row }">
{{
row
.
giftPropValues
[
i
].
valueName
}}
</
template
>
<template
slot-scope=
"
{ row }">
{{
row
.
giftPropValues
[
i
].
valueName
}}
</
template
>
</el-table-column>
<el-table-column
label=
"积分"
>
<
template
slot-scope=
"{ row }"
>
<el-input
size=
"small"
v-model
.
trim=
"row.giftProSkuIntegral"
></el-input
>
<el-input
size=
"small"
v-model
.
trim=
"row.giftProSkuIntegral"
/
>
</
template
>
</el-table-column>
<el-table-column
label=
"现金(元)"
>
<
template
slot-scope=
"{ row }"
>
<el-input
size=
"small"
v-model
.
trim=
"row.giftProSkuCash"
></el-input
>
<el-input
size=
"small"
v-model
.
trim=
"row.giftProSkuCash"
/
>
</
template
>
</el-table-column>
</el-table>
<el-form
v-if=
"list3.length && !isTable"
>
<el-form-item
label=
"积分"
>
<el-input
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuIntegral"
style=
"width:180px"
></el-input>
<el-input
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuIntegral"
style=
"width:180px"
/>
</el-form-item>
<el-form-item
label=
"现金"
>
<el-input
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuCash"
style=
"width:180px"
/>
元
</el-form-item>
<el-form-item
label=
"现金"
>
<el-input
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuCash"
style=
"width:180px"
></el-input>
元
</el-form-item>
</el-form>
</el-tab-pane>
</el-tabs>
<div
style=
"margin-top: 20px;text-align:right"
>
<el-button
type=
"primary"
@
click=
"saveLadderDetail"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"saveLadderDetail"
>
保存
</el-button>
</div>
</div>
</el-dialog>
...
...
@@ -55,12 +79,12 @@ export default {
props
:
{
ladderPriceData
:
{
type
:
Object
,
default
()
{
default
()
{
return
{};
}
}
}
,
}
,
},
data
()
{
data
()
{
return
{
selectTab
:
0
,
loading
:
false
,
...
...
@@ -76,20 +100,20 @@ export default {
memberGrade
:
''
,
integral
:
''
,
cash
:
''
,
isCorrect
:
true
isCorrect
:
true
,
};
},
created
()
{
created
()
{
// console.log(this.ladderPriceData);
this
.
dialogVisible
=
true
;
this
.
id
=
this
.
ladderPriceData
.
id
;
this
.
getInfo
();
},
methods
:
{
async
getInfo
()
{
async
getInfo
()
{
console
.
log
(
111
);
le
t
params
=
{
integralMallProId
:
this
.
id
cons
t
params
=
{
integralMallProId
:
this
.
id
,
};
this
.
loading
=
true
;
request
...
...
@@ -98,20 +122,20 @@ export default {
if
(
res
.
data
.
errorCode
===
0
)
{
this
.
skuHeaderList
=
[];
if
(
res
.
data
.
result
.
skuJsonList
)
{
for
(
le
t
item
of
JSON
.
parse
(
res
.
data
.
result
.
skuJsonList
[
0
].
giftPropValues
))
{
for
(
cons
t
item
of
JSON
.
parse
(
res
.
data
.
result
.
skuJsonList
[
0
].
giftPropValues
))
{
this
.
skuHeaderList
.
push
({
proName
:
item
.
proName
,
proId
:
item
.
proId
proId
:
item
.
proId
,
});
}
}
this
.
list3
=
res
.
data
.
result
.
gradeProSkus
?
res
.
data
.
result
.
gradeProSkus
:
[];
this
.
list3
.
forEach
(
item
=>
{
item
.
skuList
.
forEach
(
it
=>
{
item
.
skuList
&&
item
.
skuList
.
forEach
(
it
=>
{
it
.
giftPropValues
=
JSON
.
parse
(
it
.
giftPropValuesJson
);
});
});
le
t
giftProStandardJson
=
res
.
data
.
result
.
giftProStandardJson
?
JSON
.
parse
(
res
.
data
.
result
.
giftProStandardJson
)
:
[];
cons
t
giftProStandardJson
=
res
.
data
.
result
.
giftProStandardJson
?
JSON
.
parse
(
res
.
data
.
result
.
giftProStandardJson
)
:
[];
this
.
isTable
=
giftProStandardJson
.
length
;
// giftProStandardJson存在代表有sku
// this.gradeType = res.data.result.gradeType;
// this.memberGrade = res.data.result.memberGrade;
...
...
@@ -124,7 +148,7 @@ export default {
})
.
finally
(()
=>
(
this
.
loading
=
false
));
},
handleLadder
(
value
)
{
handleLadder
(
value
)
{
value
.
forEach
(
item
=>
{
item
.
giftProSkuIntegral
=
this
.
integral
?
this
.
integral
:
item
.
giftProSkuIntegral
;
item
.
giftProSkuCash
=
this
.
cash
?
this
.
cash
:
item
.
giftProSkuCash
;
...
...
@@ -132,10 +156,10 @@ export default {
this
.
integral
=
''
;
this
.
cash
=
''
;
},
saveLadderDetail
()
{
saveLadderDetail
()
{
this
.
isCorrect
=
true
;
for
(
let
i
=
0
;
i
<
this
.
list3
.
length
;
i
++
)
{
le
t
skuList
=
this
.
list3
[
i
].
skuList
;
cons
t
skuList
=
this
.
list3
[
i
].
skuList
;
if
(
this
.
isCorrect
)
{
for
(
let
j
=
0
;
j
<
skuList
.
length
;
j
++
)
{
if
(
skuList
[
j
].
giftProSkuCash
&&
(
skuList
[
j
].
giftProSkuIntegral
===
''
||
skuList
[
j
].
giftProSkuIntegral
===
null
))
{
...
...
@@ -149,7 +173,7 @@ export default {
break
;
}
if
(
skuList
[
j
].
giftProSkuCash
&&
skuList
[
j
].
giftProSkuIntegral
)
{
le
t
itemPlus
=
Number
(
skuList
[
j
].
giftProSkuCash
)
+
Number
(
skuList
[
j
].
giftProSkuIntegral
);
cons
t
itemPlus
=
Number
(
skuList
[
j
].
giftProSkuCash
)
+
Number
(
skuList
[
j
].
giftProSkuIntegral
);
if
(
!
itemPlus
)
{
this
.
isCorrect
=
false
;
this
.
$message
.
error
(
'积分和现金相加不可为0'
);
...
...
@@ -162,9 +186,9 @@ export default {
}
}
if
(
this
.
isCorrect
)
{
le
t
params
=
{
cons
t
params
=
{
integralMallProId
:
this
.
id
,
differentialPricingJson
:
JSON
.
stringify
(
this
.
list3
)
differentialPricingJson
:
JSON
.
stringify
(
this
.
list3
)
,
};
request
.
post
(
'/api-integral-mall/set-differential-pricing'
,
qs
.
stringify
(
params
)).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
...
...
@@ -177,13 +201,13 @@ export default {
});
}
},
cancelSubmit
()
{
cancelSubmit
()
{
this
.
dialogVisible
=
false
;
setInterval
(()
=>
{
this
.
$emit
(
'closeUpdateLadder'
);
},
10
);
}
}
}
,
}
,
};
</
script
>
<
style
scoped
>
...
...
src/views/goods/coupon/coupon.vue
View file @
410b5a98
...
...
@@ -333,7 +333,7 @@
<el-button
type=
"text"
v-if=
"scope.row.canEdit"
>
删除
</el-button>
</dm-delete>
-->
<el-dropdown
v-if=
"
scope.row.isDifferentialPricing || scope.row.canEdit || $getButtonLimit($buttonCode.couponTieredPricing)|| $getButtonLimit($buttonCode.couponDelete
)"
v-if=
"
(scope.row.isDifferentialPricing || scope.row.canEdit)&& ($getButtonLimit($buttonCode.couponTieredPricing)|| $getButtonLimit($buttonCode.couponDelete)
)"
style=
"margin-left:20px;"
@
command=
"command => handleCommand(command, scope.row, scope.$index)"
placement=
"bottom-start"
...
...
src/views/goods/gift/gift.vue
View file @
410b5a98
...
...
@@ -354,7 +354,7 @@
编辑
</el-button>
<el-dropdown
v-if=
"(
scope.row.changeType === '5' && scope.row.canEdit) || scope.row.isDifferentialPricing || scope.row.canEdit ||$getButtonLimit($buttonCode.giftCouponCode) || $getButtonLimit($buttonCode.giftTieredPricing) || $getButtonLimit($buttonCode.giftDelete
)"
v-if=
"(
(scope.row.changeType === '5' && scope.row.canEdit) || scope.row.isDifferentialPricing || scope.row.canEdit) && ($getButtonLimit($buttonCode.giftCouponCode) || $getButtonLimit($buttonCode.giftTieredPricing) || $getButtonLimit($buttonCode.giftDelete)
)"
style=
"margin-left:20px;"
@
command=
"command => handleCommand(command, scope.row, scope.$index)"
placement=
"bottom-start"
...
...
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