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
bc924129
Commit
bc924129
authored
Feb 09, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udpate: dist
parent
20a6844a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
19 deletions
+33
-19
info.vue
src/views/goods/ruleList/info.vue
+33
-15
ruleList.vue
src/views/goods/ruleList/ruleList.vue
+0
-4
No files found.
src/views/goods/ruleList/info.vue
View file @
bc924129
...
...
@@ -24,6 +24,7 @@
:model=
"ruleForm"
label-width=
"160px"
size=
"small"
v-loading=
"loading"
>
<el-form-item
label=
"上架规则名称"
prop=
"ruleTitle"
>
<el-input
...
...
@@ -79,7 +80,12 @@
</el-form-item>
<div>
<el-form-item
style=
"margin-top:50px"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"submit()"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"submit()"
:loading=
"btnLoading"
>
确认
</el-button>
</el-form-item>
...
...
@@ -119,6 +125,8 @@ export default {
isEdit
:
this
.
$route
.
meta
.
type
===
'edit'
,
isAdd
:
this
.
$route
.
meta
.
type
===
'add'
,
isCopy
:
this
.
$route
.
meta
.
type
===
'copy'
,
loading
:
false
,
btnLoading
:
false
,
};
},
computed
:
{
...
...
@@ -127,7 +135,6 @@ export default {
},
},
mounted
()
{
console
.
log
(
this
.
$route
.
params
.
id
);
if
(
!
this
.
isAdd
)
{
this
.
integralMallProRuleId
=
this
.
$route
.
params
.
id
;
this
.
getDatail
(
this
.
$route
.
params
.
id
);
...
...
@@ -149,50 +156,49 @@ export default {
},
// 获取需要回显的数据, 供保存时候使用
getBackData
(
val
)
{
console
.
log
(
val
);
this
.
ruleForm
.
searchJson
=
val
;
},
// 显示编辑,保存按钮隐藏,确认按钮显示 (子组件会调用)
editShow
()
{
console
.
log
(
'hideBtn'
);
this
.
toggleTag
=
true
;
},
// 显示保存按钮,隐藏确认按钮显示 (子组件会调用)
editHide
()
{
console
.
log
(
'hideBtn'
);
console
.
log
(
this
.
useId
);
this
.
toggleTag
=
false
;
},
// 子组件触发父组件事件,返回过滤条件数据
findFilter
(
value
)
{
console
.
log
(
value
);
this
.
ruleForm
.
filterJson
=
value
;
},
// 隐藏保存按钮和确认按钮 (子组件会调用)
// 传个参数给父组件 来查数据
hideBtn
()
{
console
.
log
(
'hideBtn'
);
this
.
toggleTag
=
false
;
},
getDatail
(
integralMallProRuleId
)
{
this
.
loading
=
true
;
request
.
get
(
'/api-integral-mall/get-rule'
,
{
params
:
{
integralMallProRuleId
}
}).
then
(
res
=>
{
if
(
res
.
data
.
result
)
{
this
.
ruleForm
=
res
.
data
.
result
;
if
(
this
.
ruleForm
.
memberType
==
3
)
{
this
.
hasSearchData
=
this
.
ruleForm
.
filterJson
;
this
.
useId
=
this
.
ruleForm
.
searchId
;
if
(
this
.
isCopy
)
{
const
form
=
new
FormData
();
form
.
append
(
'requestProject'
,
'integral-mall'
);
form
.
append
(
'id'
,
this
.
ruleForm
.
searchId
);
request
.
post
(
'/api-plug/get-screening-detail'
,
form
).
then
(
res
=>
{
this
.
ruleForm
.
searchJson
=
res
.
data
.
result
&&
res
.
data
.
result
.
detail
;
});
}
}
}
}).
finally
(()
=>
{
this
.
loading
=
false
;
});
},
submit
()
{
if
(
this
.
ruleForm
.
memberType
===
3
)
{
if
(
this
.
toggleTag
&&
!
this
.
ruleForm
.
filterJson
)
{
this
.
$message
.
error
(
'请选中人群筛选器的数据'
);
return
false
;
}
}
submitRequest
()
{
this
.
$refs
.
ruleForm
.
validate
(
val
=>
{
if
(
val
)
{
let
data
=
{};
...
...
@@ -206,12 +212,24 @@ export default {
delete
data
.
filterJson
;
delete
data
.
searchJson
;
}
this
.
btnLoading
=
true
;
request
.
post
(
'/api-integral-mall/add-update-rule'
,
data
).
then
(
res
=>
{
this
.
$router
.
go
(
-
1
);
}).
finally
(()
=>
{
this
.
btnLoading
=
false
;
});
}
});
},
submit
()
{
if
(
this
.
toggleTag
)
{
this
.
$refs
.
peopleFilter
.
confirmSet
().
then
(()
=>
{
this
.
submitRequest
();
});
}
else
{
this
.
submitRequest
();
}
},
},
};
...
...
src/views/goods/ruleList/ruleList.vue
View file @
bc924129
...
...
@@ -273,7 +273,6 @@ import getInputVal from '@/utils/common.js';
export
default
{
filters
:
{
filterProType
(
val
)
{
console
.
log
(
val
);
let
str
=
''
;
switch
(
val
)
{
case
1
:
...
...
@@ -317,15 +316,12 @@ export default {
};
},
mounted
()
{
console
.
log
(
this
.
$buttonCode
);
this
.
getList
();
},
methods
:
{
getList
()
{
this
.
loading
=
true
;
request
.
get
(
'/api-integral-mall/list-rule'
,
{
params
:
{
ruleTitle
:
this
.
ruleTitle
}
}).
then
(
res
=>
{
console
.
log
(
res
.
data
.
result
);
this
.
tableDate
=
res
.
data
.
result
||
[];
}).
finally
(
_
=>
{
this
.
loading
=
false
;
...
...
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