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
ae82abd3
Commit
ae82abd3
authored
Jun 15, 2022
by
crushh
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix/上架规则' into master
parents
94ff14f3
3091304d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
20 deletions
+45
-20
relatePop.vue
src/components/relatePop.vue
+28
-3
ruleDetail.vue
src/components/ruleDetail.vue
+17
-17
No files found.
src/components/relatePop.vue
View file @
ae82abd3
...
...
@@ -97,6 +97,7 @@
<
script
>
import
request
from
'@/service/request.js'
;
import
ruleInfo
from
'@/components/ruleDetail.vue'
;
// import qs from 'qs';
export
default
{
name
:
'RelatePop'
,
components
:
{
...
...
@@ -146,22 +147,46 @@ export default {
getList
()
{
this
.
loading
=
true
;
this
.
tableRadio
=
''
;
request
.
get
(
'/api-integral-mall/page-rule'
,
{
params
:
this
.
relateForm
}).
then
(
async
(
res
)
=>
{
request
.
get
(
'/api-integral-mall/page-rule'
,
{
params
:
this
.
relateForm
}).
then
(
res
=>
{
this
.
tableDate
=
res
.
data
.
result
.
result
||
[];
this
.
totalCount
=
res
.
data
.
result
.
totalCount
;
this
.
tableDate
=
this
.
tableDate
.
splice
(
0
);
if
(
this
.
echoRuleId
)
this
.
tableRadio
=
this
.
echoRuleId
;
this
.
tableDate
.
forEach
(
async
item
=>
{
if
(
item
.
memberType
==
3
&&
!
item
.
showBack
)
{
const
res
=
await
this
.
echoData
(
item
.
filterJson
);
item
.
showBack
=
res
.
data
.
result
;
}
else
if
(
item
.
memberType
==
4
&&
!
item
.
showBack
)
{
const
{
storeMode
,
storeWidgetId
}
=
JSON
.
parse
(
item
.
filterJson
);
const
res
=
await
this
.
echoData2
(
storeWidgetId
,
storeMode
);
const
{
data
:
{
result
:
{
result
}
}
}
=
res
;
if
(
result
)
{
item
.
showBack
=
result
.
map
(
item
=>
item
.
name
).
join
(
','
);
}
else
{
item
.
showBack
=
'所有门店'
;
}
}
});
}).
finally
(
_
=>
{
this
.
loading
=
false
;
});
},
echoData
(
row
)
{
echoData
(
filterJson
)
{
// 取得人群筛选器回显文字
const
form
=
new
FormData
();
form
.
append
(
'params'
,
row
.
filterJson
);
form
.
append
(
'params'
,
filterJson
);
form
.
append
(
'requestProject'
,
'integral-mall'
);
form
.
append
(
'sceneCode'
,
'member'
);
return
request
.
post
(
'/api-plug/screening-show-back'
,
form
);
},
echoData2
(
key
,
type
)
{
// 取得门店筛选器的文字回显
const
form
=
new
FormData
();
form
.
append
(
'key'
,
key
);
form
.
append
(
'selectType'
,
type
);
form
.
append
(
'currentPage'
,
1
);
form
.
append
(
'pageSize'
,
20
);
return
request
.
post
(
'/api-plug/list-right-data'
,
form
);
},
closePop
()
{
this
.
tableRadio
=
''
;
this
.
relateForm
=
{
...
...
src/components/ruleDetail.vue
View file @
ae82abd3
...
...
@@ -212,30 +212,30 @@ export default {
}
else
if
(
this
.
ruleForm
.
memberType
==
3
)
{
if
(
this
.
hasEditGicPeople
)
{
this
.
$refs
.
peopleFilter
.
confirmSet
().
then
(
async
()
=>
{
const
res
=
await
this
.
echoData
(
this
.
ruleForm
.
filterJson
);
this
.
ruleForm
.
showBack
=
res
.
data
.
result
;
//
const res = await this.echoData(this.ruleForm.filterJson);
//
this.ruleForm.showBack = res.data.result;
this
.
submitRequest
();
});
}
else
{
const
res
=
await
this
.
echoData
(
this
.
ruleForm
.
filterJson
);
this
.
ruleForm
.
showBack
=
res
.
data
.
result
;
//
const res = await this.echoData(this.ruleForm.filterJson);
//
this.ruleForm.showBack = res.data.result;
this
.
submitRequest
();
}
}
else
if
(
this
.
ruleForm
.
memberType
==
4
)
{
this
.
$refs
.
storeGroup
.
getStoreConfig
().
then
(
async
(
data
)
=>
{
let
type
=
0
;
if
(
data
.
type
!=
0
)
{
type
=
1
;
}
const
res
=
await
this
.
echoData2
(
this
.
uuid
,
data
.
type
);
const
{
data
:
{
result
:
{
result
}
}
}
=
res
;
console
.
log
(
result
);
if
(
result
)
{
this
.
ruleForm
.
showBack
=
result
.
map
(
item
=>
item
.
name
).
join
(
','
);
}
else
{
this
.
ruleForm
.
showBack
=
'所有门店'
;
}
this
.
ruleForm
.
filterJson
=
JSON
.
stringify
({
storeMode
:
type
,
storeWidgetId
:
this
.
uuid
});
//
let type = 0;
//
if (data.type != 0) {
//
type = 1;
//
}
//
const res = await this.echoData2(this.uuid, data.type);
//
const { data: { result: { result } } } = res;
//
console.log(result);
//
if (result) {
//
this.ruleForm.showBack = result.map(item => item.name).join(',');
//
} else {
//
this.ruleForm.showBack = '所有门店';
//
}
this
.
ruleForm
.
filterJson
=
JSON
.
stringify
({
storeMode
:
data
.
type
,
storeWidgetId
:
this
.
uuid
});
this
.
ruleForm
.
searchJson
=
''
;
this
.
ruleForm
.
searchId
=
this
.
uuid
;
this
.
submitRequest
();
...
...
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