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
fd7f6e16
Commit
fd7f6e16
authored
Jan 21, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udpate: tem
parent
c6089df9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
133 additions
and
58 deletions
+133
-58
info.vue
src/views/goods/ruleList/info.vue
+55
-10
ruleList.vue
src/views/goods/ruleList/ruleList.vue
+78
-48
No files found.
src/views/goods/ruleList/info.vue
View file @
fd7f6e16
...
...
@@ -23,26 +23,49 @@
label-width=
"160px"
size=
"small"
>
<el-form-item
label=
"上架规则名称"
prop=
"
activityNam
e"
>
<el-form-item
label=
"上架规则名称"
prop=
"
ruleTitl
e"
>
<el-input
maxlength=
"12"
show-word-limit
placeholder=
"请输入上架规则名称"
v-model=
"ruleForm.activityName"
v-model=
"ruleForm.ruleTitle"
style=
"width:340px"
/>
</el-form-item>
<el-form-item
label=
"上架规则名称备注"
prop=
"
activityRemark
"
>
<el-form-item
label=
"上架规则名称备注"
prop=
"
ruleExplanation
"
>
<el-input
maxlength=
"30"
show-word-limit
placeholder=
"请输入上架规则说明"
v-model=
"ruleForm.
activityRemark
"
v-model=
"ruleForm.
ruleExplanation
"
style=
"width:340px"
/>
</el-form-item>
<el-form-item
label=
"适用人群"
prop=
"activityTime"
>
<el-radio
v-model=
"ruleForm.memberType"
:label=
"1"
>
全部会员
</el-radio>
<el-radio
v-model=
"ruleForm.memberType"
:label=
"2"
>
会员分组
</el-radio>
<el-radio
v-model=
"ruleForm.memberType"
:label=
"3"
>
会员筛选
</el-radio>
</el-form-item>
<el-form-item
v-if=
"ruleForm.memberType === 2"
>
<vue-gic-member-group
style=
"padding-left:0"
:readonly=
"readonly"
:height=
"543"
:defaltSelected=
"defaltSelected"
:projectName=
"projectName"
:effectiveStatus=
"1"
@
handleDataTransferred=
"handleDataTransferred"
@
handleDataLeft=
"handleDataLeft"
/>
</el-form-item>
<el-form-item
v-if=
"ruleForm.memberType === 3"
>
<vue-gic-people
:projectName=
"projectName"
:searchBackTxt
.
sync=
"searchBackTxt"
...
...
@@ -67,7 +90,8 @@
</el-button>
</div>
</el-form-item>
<div
class=
"confim-btn"
>
<div
class=
"confim-btn"
:style=
"
{ width: fixedWidth + 'px' }">
<el-button
type=
"primary"
size=
"small"
@
click=
"nextStep()"
>
确认新建
</el-button>
...
...
@@ -85,11 +109,12 @@ export default {
callback
(
new
Error
(
'请填写'
));
};
return
{
fixedWidth
:
document
.
documentElement
.
clientWidth
-
200
,
ruleForm
:
{
},
rules
:
{
activityNam
e
:
[
ruleTitl
e
:
[
{
required
:
true
,
message
:
'请填写'
,
trigger
:
'blur'
},
],
activityTime
:
[
...
...
@@ -103,7 +128,8 @@ export default {
hasSearchData
:
''
,
sceneValue
:
'member'
,
// 场景值
responseParams
:
[],
// 回显的数据
defaltSelected
:
[],
headerList
:
[
'isRealTime'
,
'latestUpdateTime'
,
'updateType'
,
'effectiveStatus'
,
'effectiveDate'
],
// 表头配置,默认全部,分组名称默认显示不可配置
};
},
methods
:
{
...
...
@@ -125,10 +151,29 @@ export default {
// 传个参数给父组件 来查数据
hideBtn
(
refresh
)
{
},
handleDataTransferred
(
data
)
{
this
.
defaltSelected
=
data
;
},
handleDataLeft
(
selectedData
,
selectionToRemove
)
{
this
.
defaltSelected
=
selectedData
;
},
},
};
</
script
>
<
style
>
<
style
scoped
>
.confim-btn
{
height
:
32px
;
padding
:
12px
0
;
position
:
fixed
;
bottom
:
0px
;
left
:
200px
;
background
:
#fff
;
z-index
:
2
;
text-align
:
center
;
border-top
:
1px
solid
#dcdfe6
;
}
.fix-btn
{
margin-left
:
-100px
;
}
</
style
>
src/views/goods/ruleList/ruleList.vue
View file @
fd7f6e16
...
...
@@ -18,7 +18,7 @@
<div
class=
"search-wrap"
>
<div
class=
"table-page-search-wrapper"
>
<el-input
v-model=
"
searchValu
e"
v-model=
"
ruleTitl
e"
placeholder=
"请输入上架规则名称"
prefix-icon=
"el-icon-search"
clearable
...
...
@@ -50,40 +50,39 @@
<template
slot-scope=
"
{row}">
<div>
<div
class=
"title"
>
{{
row
.
t
itle
}}
{{
row
.
ruleT
itle
}}
</div>
<div
style=
"font-size: 12px;color: rgb(144, 147, 153);"
>
{{
row
.
tips
}}
{{
row
.
ruleExplanation
}}
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"r
uleTitle
"
prop=
"r
elationCount
"
label=
"已关联商品"
>
<
template
slot-scope=
"{row}"
>
<span
style=
"margin-right:20px"
>
{{
row
.
number
}}
{{
row
.
relationCount
}}
</span>
<el-button
type=
"text"
@
click=
"relatingDetail(row)"
@
click=
"relatingDetail(row
.integralMallProRuleId,'查看'
)"
>
查看
</el-button>
</
template
>
</el-table-column>
<el-table-column
prop=
"ruleTitle"
label=
"操作"
>
<
template
slot-scope=
"{row}"
>
<el-button
type=
"text"
@
click=
"relating
(row
)"
@
click=
"relating
Detail(row.integralMallProRuleId,'选择'
)"
>
关联商品
</el-button>
...
...
@@ -109,45 +108,49 @@
</el-table-column>
</el-table>
<el-dialog
:title=
"
title
"
:visible
.
sync=
"dialogTableVisible"
width=
"850px"
>
<div
:class=
"['infoTips',t
itle=='查看关联商品
'?'infoTips_waring':'']"
>
<i
:class=
"['el-icon-info','infoTipsIcon',t
itle=='查看关联商品
'?'infoTips_waring':'']"
/>
<el-dialog
:title=
"
`${type}关联商品`
"
:visible
.
sync=
"dialogTableVisible"
width=
"850px"
>
<div
:class=
"['infoTips',t
ype=='查看
'?'infoTips_waring':'']"
>
<i
:class=
"['el-icon-info','infoTipsIcon',t
ype=='查看
'?'infoTips_waring':'']"
/>
<div
class=
"infoTipsContent"
>
{{ t
itle=='查看关联商品
'?'移除规则后,上架规则不再作用于商品,商品将不能在会员小程序-积分商城上展示,请谨慎操作!':'选中已关联上架规则的商品,则规则被更新' }}
{{ t
ype=='查看
'?'移除规则后,上架规则不再作用于商品,商品将不能在会员小程序-积分商城上展示,请谨慎操作!':'选中已关联上架规则的商品,则规则被更新' }}
<br>
</div>
</div>
<div
class=
"search-wrap"
>
<div
class=
"table-page-search-wrapper"
>
<el-select
v-model=
"relateForm.
t
ype"
v-model=
"relateForm.
proT
ype"
clearable
class=
"w-160"
placeholder=
"所有商品类型"
@
change=
"
changeType
"
@
change=
"
searchGoods
"
>
<el-option
label=
"礼品"
:value=
"0"
/>
<el-option
label=
"优惠券"
:value=
"1"
/>
<el-option
label=
"兑换券"
:value=
"2"
/>
<el-option
label=
"实物礼品"
:value=
"3"
/>
</el-select>
<el-select
v-model=
"relateForm.relate"
v-if=
"type=='选择'"
v-model=
"relateForm.ruleRelationFlag"
clearable
placeholder=
"是否已关联上架规则"
class=
"w-180"
@
change=
"
changeType
"
@
change=
"
searchGoods
"
>
<el-option
label=
"已关联上架规则"
:value=
"0"
/>
<el-option
label=
"未关联上架规则"
:value=
"1"
/>
</el-select>
<el-input
placeholder=
"请输入礼品名称/礼品编码"
v-model=
"relateForm.
date
"
v-model=
"relateForm.
search
"
clearable
size=
"small"
class=
"w-260"
@
clear=
"searchGoods"
@
keyup
.
enter
.
native=
"searchGoods"
/>
</div>
<el-button
type=
"primary"
size=
"small"
v-if=
"t
itle=='查看关联商品
'"
>
<el-button
type=
"primary"
size=
"small"
v-if=
"t
ype=='查看
'"
>
批量移除
</el-button>
</div>
...
...
@@ -171,13 +174,13 @@
</div>
</
template
>
</el-table-column>
<el-table-column
property=
"
t
ype"
label=
"商品类型"
width=
"100"
/>
<el-table-column
property=
"
pric
e"
label=
"成本"
width=
"100"
/>
<el-table-column
property=
"
s
tock"
label=
"当前库存"
width=
"100"
/>
<el-table-column
property=
"r
elat
e"
label=
"是否已关联规则"
min-width=
"120"
>
<el-table-column
property=
"
proT
ype"
label=
"商品类型"
width=
"100"
/>
<el-table-column
property=
"
costValu
e"
label=
"成本"
width=
"100"
/>
<el-table-column
property=
"
virtualS
tock"
label=
"当前库存"
width=
"100"
/>
<el-table-column
property=
"r
uleTitl
e"
label=
"是否已关联规则"
min-width=
"120"
>
<
template
slot-scope=
"{row}"
>
<p
class=
"goods-descript"
>
{{
row
.
r
elate
}}
{{
row
.
r
uleTitle
?
row
.
ruleTitle
:
'否'
}}
</p>
</
template
>
</el-table-column>
...
...
@@ -186,7 +189,10 @@
<div
class=
"pagination"
>
<el-pagination
layout=
"prev, pager, next"
:total=
"50"
:current-page
.
sync=
"relateForm.currentPage"
:page-size
.
sync=
"relateForm.pageSize"
@
current-change=
"getRelatingGoodsTable"
:total=
"totalCount"
/>
</div>
</div>
...
...
@@ -197,7 +203,7 @@
size=
"small"
:loading=
"btnLoading"
@
click=
"submit"
v-if=
"t
itle=='选择关联商品
'"
v-if=
"t
ype=='选择
'"
>
确定
</el-button>
</span>
</el-dialog>
...
...
@@ -207,6 +213,7 @@
</template>
<
script
>
import
request
from
'@/service/request.js'
;
export
default
{
data
()
{
return
{
...
...
@@ -217,14 +224,16 @@ export default {
],
multipleSelection
:
[],
dialogTableVisible
:
false
,
t
itle
:
'选择关联商品
'
,
t
ype
:
'选择
'
,
relateForm
:
{
date
:
''
,
type
:
''
,
relate
:
''
,
search
:
''
,
proType
:
''
,
pageSize
:
5
,
currentPage
:
1
,
ruleRelationFlag
:
''
,
},
searchValu
e
:
''
,
total
:
100
,
ruleTitl
e
:
''
,
total
Count
:
''
,
};
},
mounted
()
{
...
...
@@ -232,24 +241,29 @@ export default {
},
methods
:
{
getList
()
{
request
.
get
(
'/api-integral-mall/list-rule'
,
{
ruleTitle
:
this
.
ruleTitle
}).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
if
(
res
.
data
.
result
.
result
)
{
this
.
tableDate
=
res
.
data
.
result
.
result
;
}
}
});
for
(
let
i
=
0
;
i
<
19
;
i
++
)
{
this
.
tableDate
.
push
(
{
t
itle
:
'新客积分兑换上架规则规则'
,
tips
:
'上架规则说明内容内容上架规则说明内容内容上架规则说明内容内容'
,
number
:
236
,
ruleT
itle
:
'新客积分兑换上架规则规则'
,
ruleExplanation
:
'上架规则说明内容内容上架规则说明内容内容上架规则说明内容内容'
,
relationCount
:
236
,
},
);
}
},
relatingDetail
(
row
)
{
relatingDetail
(
integralMallProRuleId
,
type
)
{
this
.
dialogTableVisible
=
true
;
this
.
title
=
'查看关联商品'
;
this
.
getRelatingGoodsTable
(
row
);
},
relating
(
row
)
{
this
.
dialogTableVisible
=
true
;
this
.
title
=
'选择关联商品'
;
this
.
type
=
type
;
this
.
relateForm
.
currentPage
=
1
;
this
.
relateForm
.
integralMallProRuleId
=
integralMallProRuleId
;
this
.
getRelatingGoodsTable
();
},
editRule
(
row
)
{
this
.
$router
.
push
({
path
:
'/editRule'
,
query
:
{
id
:
row
.
id
}
});
...
...
@@ -274,20 +288,36 @@ export default {
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
getRelatingGoodsTable
(
row
)
{
getRelatingGoodsTable
()
{
this
.
loading
=
true
;
const
api
=
this
.
type
==
'选择'
?
'/api-integral-mall/page-select-rule-pro'
:
'/api-integral-mall/page-rule-pro'
;
// const params = this.type =='选择'?
request
.
get
(
api
,
{
params
:
this
.
relateForm
}).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
if
(
res
.
data
.
result
.
result
)
{
this
.
relatingGoodsTable
=
res
.
data
.
result
.
result
;
this
.
totalCount
=
res
.
data
.
result
.
totalCount
;
}
}
}).
finally
(
_
=>
{
this
.
loading
=
false
;
});
this
.
relatingGoodsTable
=
[];
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
this
.
relatingGoodsTable
.
push
({
mallProImageUrl
:
'https://pic01-10001430.image.myqcloud.com/f39e4665-db45-487e-847a-673fedddab44'
,
proName
:
'上架规则说明内容内容上架规则说明内容内容上架规则说明内容内容'
,
proCode
:
236
,
t
ype
:
'实物礼品'
,
pric
e
:
1000.00
,
s
tock
:
1000
,
r
elat
e
:
'新客积分兑换上架规则规则'
,
proT
ype
:
'实物礼品'
,
costValu
e
:
1000.00
,
virtualS
tock
:
1000
,
r
uleTitl
e
:
'新客积分兑换上架规则规则'
,
});
}
this
.
loading
=
false
;
},
searchGoods
()
{
this
.
relateForm
.
currentPage
=
1
;
this
.
getRelatingGoodsTable
();
},
},
...
...
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