Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
a2d15146
Commit
a2d15146
authored
Apr 01, 2023
by
邓春圆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠活动bug修复
parent
56175e72
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
20 deletions
+42
-20
index.vue
src/views/ecw/product/index.vue
+42
-20
No files found.
src/views/ecw/product/index.vue
View file @
a2d15146
...
@@ -206,19 +206,6 @@
...
@@ -206,19 +206,6 @@
<el-radio
v-model.number=
"form.needBook"
:label=
"1"
>
{{$t('是')}}
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"1"
>
{{$t('是')}}
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"0"
>
{{$t('否')}}
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"0"
>
{{$t('否')}}
</el-radio>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"this.form.id == null "
:label=
"$t('可参与优惠')"
>
<!-- <el-select multiple v-model="form.couponlds" size="5" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px">-->
<!-- <el-option v-for="item in preferentialList" :value="item.couponId" :label="item.titleZh" :key="item.couponId" :disabled="item.mandatory">{{item.titleZh}}</el-option>-->
<!-- </el-select>-->
<div
style=
"width: 300px;height: 400px;border: 1px solid;overflow-y: auto"
>
<div
@
click=
"selectMoveAbout(item)"
style=
"display: flex;justify-content: space-between; align-items: center;"
:style=
"{'cursor':item.mandatory ? 'no-drop' : 'pointer' }"
v-for=
"item in preferentialList"
>
<div>
{{$l(item, 'title')}}
</div>
<i
v-if=
"form.couponIds.includes(item.couponId)"
style=
"margin-right: 20px;"
class=
"el-icon-check"
></i>
</div>
</div>
</el-form-item>
<!-- <el-form-item :label="$t('可参与优惠活动')" prop="you">
<!-- <el-form-item :label="$t('可参与优惠活动')" prop="you">
<el-select v-model="form.you" :placeholder="$t('可参与优惠活动')" clearable>
<el-select v-model="form.you" :placeholder="$t('可参与优惠活动')" clearable>
<el-option v-for="packageItem in packagingList" :key="packageItem.value" :label="packageItem.label" :value="packageItem.value" />
<el-option v-for="packageItem in packagingList" :key="packageItem.value" :label="packageItem.label" :value="packageItem.value" />
...
@@ -229,7 +216,19 @@
...
@@ -229,7 +216,19 @@
<
template
slot=
"append"
>
{{
$t
(
'
立方米
'
)
}}
</
template
>
<
template
slot=
"append"
>
{{
$t
(
'
立方米
'
)
}}
</
template
>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('可参与优惠')"
>
<!-- <el-select multiple v-model="form.couponlds" size="5" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px">-->
<!-- <el-option v-for="item in preferentialList" :value="item.couponId" :label="item.titleZh" :key="item.couponId" :disabled="item.mandatory">{{item.titleZh}}</el-option>-->
<!-- </el-select>-->
<div
style=
"width: 300px;height: 400px;border: 1px solid;overflow-y: auto"
>
<div
@
click=
"selectMoveAbout(item)"
style=
"display: flex;justify-content: space-between; align-items: center;"
:style=
"{'cursor':item.mandatory ? 'no-drop' : 'pointer' }"
v-for=
"item in preferentialList"
>
<div>
{{$l(item, 'title')}}
</div>
<i
v-if=
"form.couponIds.includes(item.couponId)"
style=
"margin-right: 20px;"
class=
"el-icon-check"
></i>
</div>
</div>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{$t('确定')}}
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{$t('确定')}}
</el-button>
...
@@ -382,10 +381,6 @@ export default {
...
@@ -382,10 +381,6 @@ export default {
this
.
getAttrList
();
this
.
getAttrList
();
this
.
getTypeList
();
this
.
getTypeList
();
this
.
getList
();
this
.
getList
();
product_coupon_newProd
().
then
(
r
=>
{
this
.
preferentialList
=
r
.
data
this
.
reset
()
})
},
},
methods
:
{
methods
:
{
/** 获取产品属性列表 */
/** 获取产品属性列表 */
...
@@ -606,14 +601,41 @@ export default {
...
@@ -606,14 +601,41 @@ export default {
});
});
},
},
selectMoveAbout
(
val
){
selectMoveAbout
(
val
){
console
.
log
(
val
,
'
val
'
)
if
(
!
val
.
mandatory
){
if
(
!
val
.
mandatory
){
let
index
=
this
.
form
.
couponIds
.
findIndex
(
i
=>
val
.
couponId
==
i
)
let
index
=
this
.
form
.
couponIds
.
findIndex
(
i
=>
val
.
couponId
==
i
)
if
(
index
>=
0
){
if
(
index
>=
0
){
this
.
$confirm
(
this
.
$t
(
`您确定要将商品从优惠活动
${
this
.
$l
(
val
,
'
title
'
)}
中移出吗?`
),
this
.
$t
(
'
提示
'
),
{
confirmButtonText
:
this
.
$t
(
'
确定
'
),
cancelButtonText
:
this
.
$t
(
'
取消
'
)
,
type
:
'
warning
'
}).
then
(()
=>
{
this
.
form
.
couponIds
.
splice
(
index
,
1
)
this
.
form
.
couponIds
.
splice
(
index
,
1
)
}).
catch
(()
=>
{
});
}
else
{
}
else
{
this
.
$confirm
(
this
.
$t
(
`您确定要将商品加入到优惠活动
${
this
.
$l
(
val
,
'
title
'
)}
中吗?`
),
this
.
$t
(
'
提示
'
),
{
confirmButtonText
:
this
.
$t
(
'
确定
'
),
cancelButtonText
:
this
.
$t
(
'
取消
'
)
,
type
:
'
warning
'
}).
then
(()
=>
{
this
.
form
.
couponIds
.
push
(
val
.
couponId
)
this
.
form
.
couponIds
.
push
(
val
.
couponId
)
}).
catch
(()
=>
{
});
}
}
}
}
}
},
watch
:{
open
(
val
){
if
(
val
){
product_coupon_newProd
().
then
(
r
=>
{
this
.
preferentialList
=
r
.
data
this
.
reset
()
})
}
}
}
}
}
};
};
...
...
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