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
2edaff9e
Commit
2edaff9e
authored
Mar 02, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 修改
parent
06ac1947
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
413 additions
and
333 deletions
+413
-333
main.c84ab8586d3f73bd0504.js
dist/js/main.c84ab8586d3f73bd0504.js
+0
-0
relatePop.vue
src/components/relatePop.vue
+116
-80
ruleDetail.vue
src/components/ruleDetail.vue
+288
-0
detail.vue
src/views/goods/coupon/detail.vue
+1
-1
detail.vue
src/views/goods/gift/detail.vue
+1
-1
info.vue
src/views/goods/gift/info.vue
+1
-1
info.vue
src/views/goods/ruleList/info.vue
+4
-248
editDeliver.vue
src/views/setting/editDeliver.vue
+1
-1
pickedAuto.vue
src/views/setting/pickedAuto.vue
+1
-1
No files found.
dist/js/main.c84ab8586d3f73bd0504.js
View file @
2edaff9e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/components/relatePop.vue
View file @
2edaff9e
<
template
>
<el-dialog
title=
"上架规则"
:visible
.
sync=
"dialogTableVisible"
width=
"850px"
>
<div
class=
"search-wrap"
>
<div
class=
"table-page-search-wrapper"
>
<el-form
@
submit
.
native
.
prevent
>
<el-input
v-model=
"relateForm.ruleTitle"
placeholder=
"请输入上架规则名称"
prefix-icon=
"el-icon-search"
clearable
class=
"w-260"
@
keyup
.
enter
.
native=
"getSearchList"
@
clear=
"getSearchList"
/>
</el-form>
</div>
<div
class=
"tips"
style=
"font-size:14px"
>
没有适用规则?
<el-button
type=
"text"
size=
"small"
@
click=
"$router.push('/addRule')"
>
去新建上架规则
</el-button>
</div>
</div>
<el-table
:data=
"tableDate"
@
row-click=
"onRowClick"
v-loading=
"loading"
>
<el-table-column
width=
"35"
>
<template
slot-scope=
"
{row}">
<div
class=
"label"
>
<el-radio
v-model=
"tableRadio"
:label=
"row.integralMallProRuleId"
/>
</div>
</
template
>
</el-table-column>
<el-table-column
property=
"ruleTitle"
label=
"上架规则名称"
>
<
template
slot-scope=
"{row}"
>
<div>
<div
class=
"title"
>
{{
row
.
ruleTitle
}}
</div>
<div
style=
"font-size: 12px;color: rgb(144, 147, 153);"
>
{{
row
.
ruleExplanation
}}
<el-dialog
title=
""
:visible
.
sync=
"dialogTableVisible"
width=
"1000px"
destroy-on-close
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"上架规则"
name=
"list"
>
<div
class=
"tab-pane-container"
>
<div
class=
"search-wrap"
>
<div
class=
"table-page-search-wrapper"
>
<el-form
@
submit
.
native
.
prevent
>
<el-input
v-model=
"relateForm.ruleTitle"
placeholder=
"请输入上架规则名称"
prefix-icon=
"el-icon-search"
clearable
class=
"w-260"
@
keyup
.
enter
.
native=
"getSearchList"
@
clear=
"getSearchList"
/>
</el-form>
</div>
<!--
<div
class=
"tips"
style=
"font-size:14px"
>
没有适用规则?
<el-button
type=
"text"
size=
"small"
@
click=
"$router.push('/addRule')"
>
去新建上架规则
</el-button>
</div>
-->
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"可见条件"
>
<
template
slot-scope=
"{row}"
>
<p
v-if=
"row.memberType==1"
>
全部顾客
</p>
<div
v-else
>
<el-tooltip
effect=
"dark"
placement=
"top-start"
v-if=
"(row.showBack&&row.showBack.length>20)"
>
<div
slot=
"content"
style=
"line-height:18px; max-width:500px;"
>
{{
row
.
showBack
}}
</div>
<div>
{{
row
.
showBack
.
slice
(
0
,
20
)
+
'...'
}}
</div>
</el-tooltip>
<div
v-else
>
{{
row
.
showBack
}}
<el-table
:data=
"tableDate"
@
row-click=
"onRowClick"
v-loading=
"loading"
>
<el-table-column
width=
"35"
>
<template
slot-scope=
"
{row}">
<div
class=
"label"
>
<el-radio
v-model=
"tableRadio"
:label=
"row.integralMallProRuleId"
/>
</div>
</
template
>
</el-table-column>
<el-table-column
property=
"ruleTitle"
label=
"上架规则名称"
>
<
template
slot-scope=
"{row}"
>
<div>
<div
class=
"title"
>
{{
row
.
ruleTitle
}}
</div>
<div
style=
"font-size: 12px;color: rgb(144, 147, 153);"
>
{{
row
.
ruleExplanation
}}
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"可见条件"
>
<
template
slot-scope=
"{row}"
>
<p
v-if=
"row.memberType==1"
>
全部顾客
</p>
<div
v-else
>
<el-tooltip
effect=
"dark"
placement=
"top-start"
v-if=
"(row.showBack&&row.showBack.length>20)"
>
<div
slot=
"content"
style=
"line-height:18px; max-width:500px;"
>
{{
row
.
showBack
}}
</div>
<div>
{{
row
.
showBack
.
slice
(
0
,
20
)
+
'...'
}}
</div>
</el-tooltip>
<div
v-else
>
{{
row
.
showBack
}}
</div>
</div>
</
template
>
</el-table-column>
</el-table>
<div
class=
"pagination-conteiner"
style=
"padding:10px 0 0 0;"
v-if=
"totalCount>5"
>
<div
class=
"pagination"
>
<el-pagination
layout=
"prev, pager, next"
:current-page
.
sync=
"relateForm.currentPage"
:page-size
.
sync=
"relateForm.pageSize"
@
current-change=
"getList"
:total=
"totalCount"
/>
</div>
</div>
</
template
>
</el-tab
le-column
>
</el-table
>
<div
class=
"pagination-conteiner"
style=
"padding:10px 0 0 0;"
v-if=
"totalCount>5
"
>
<div
class=
"pagination"
>
<el-pagination
layout=
"prev, pager, next
"
:current-page
.
sync=
"relateForm.currentPage
"
:page-size
.
sync=
"relateForm.pageSiz
e"
@
current-change=
"getList
"
:total=
"totalCount"
/
>
</
div
>
</
div
>
</
div
>
</el-tab
-pane
>
<el-tab-pane
label=
"新建规则"
name=
"form"
>
<div
class=
"tab-pane-container
"
>
<ruleInfo
:isDialog=
"true"
ref=
"ruleInfo
"
@
submit=
"getRow
"
@
btnLoading=
"btnLoading=tru
e"
@
btnStop=
"btnLoading=false
"
/>
</div
>
</
el-tab-pane
>
</
el-tabs
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"closePop"
>
取消
</el-button>
<el-button
...
...
@@ -90,9 +112,12 @@
<
script
>
import
request
from
'@/service/request.js'
;
import
ruleInfo
from
'@/components/ruleDetail.vue'
;
export
default
{
name
:
'RelatePop'
,
components
:
{
ruleInfo
,
},
props
:
{
integralMallProRuleId
:
String
,
},
...
...
@@ -101,6 +126,7 @@ export default {
loading
:
false
,
btnLoading
:
false
,
tableRadio
:
''
,
activeName
:
'list'
,
tableDate
:
[],
relateForm
:
{
ruleTitle
:
''
,
...
...
@@ -165,14 +191,21 @@ export default {
finishBtnLoading
()
{
this
.
btnLoading
=
false
;
},
getRow
(
row
)
{
this
.
$emit
(
'finish'
,
row
);
},
submit
()
{
if
(
!
this
.
tableRadio
)
{
this
.
$message
.
warning
(
'请选择规则'
);
return
;
if
(
this
.
activeName
==
'list'
)
{
if
(
!
this
.
tableRadio
)
{
this
.
$message
.
warning
(
'请选择规则'
);
return
;
}
const
row
=
this
.
tableDate
.
filter
(
item
=>
item
.
integralMallProRuleId
==
this
.
tableRadio
)[
0
];
this
.
btnLoading
=
true
;
this
.
$emit
(
'finish'
,
row
);
}
else
{
this
.
$refs
.
ruleInfo
.
submit
();
}
const
row
=
this
.
tableDate
.
filter
(
item
=>
item
.
integralMallProRuleId
==
this
.
tableRadio
)[
0
];
this
.
btnLoading
=
true
;
this
.
$emit
(
'finish'
,
row
);
},
},
};
...
...
@@ -184,4 +217,7 @@ export default {
display
:
none
;
}
}
.tab-pane-container
{
margin-top
:
24px
;
}
</
style
>
src/components/ruleDetail.vue
0 → 100644
View file @
2edaff9e
<
template
>
<el-form
ref=
"ruleForm"
:rules=
"rules"
:model=
"ruleForm"
label-width=
"130px"
size=
"small"
v-loading=
"loading"
>
<el-form-item
label=
"上架规则名称"
prop=
"ruleTitle"
>
<el-input
maxlength=
"30"
show-word-limit
placeholder=
"请输入上架规则名称"
v-model=
"ruleForm.ruleTitle"
clearable
@
clear=
"ruleForm.ruleTitle=''"
style=
"width:340px"
/>
</el-form-item>
<el-form-item
label=
"上架规则名称备注"
prop=
"ruleExplanation"
>
<el-input
maxlength=
"50"
show-word-limit
placeholder=
"请输入上架规则说明"
v-model=
"ruleForm.ruleExplanation"
style=
"width:340px"
/>
</el-form-item>
<el-form-item
label=
"适用人群"
prop=
"memberType"
>
<span
class=
"tips"
>
【人群筛选器】类型的上架规则最多支持20条,目前已创建
<span
style=
"color:#1890ff"
>
{{
memberTypeTotal
}}
</span>
条
</span>
<div>
<el-radio
v-model=
"ruleForm.memberType"
:label=
"1"
>
全部客户
</el-radio>
<el-radio
v-model=
"ruleForm.memberType"
:label=
"4"
>
门店筛选
</el-radio>
<el-radio
v-model=
"ruleForm.memberType"
:label=
"3"
:disabled=
"memberTypeTotal>=20&&isAdd"
v-if=
"ruleMemberFilterClose==0"
>
人群筛选器
</el-radio>
</div>
</el-form-item>
<el-form-item
v-show=
"ruleForm.memberType === 4"
>
<vue-gic-store-new
:isAdd=
"isAdd || !uuid"
:uuid
.
sync=
"uuid"
ref=
"storeGroup"
@
store-change=
"storeChange"
/>
</el-form-item>
<vue-gic-people
v-show=
"ruleForm.memberType === 3"
v-bind=
"storeParams"
:projectName=
"projectName"
:triggerReset=
"true"
:useId=
"useId"
:hasSearchData=
"hasSearchData"
:sceneValue=
"sceneValue"
ref=
"peopleFilter"
@
findFilter=
"findFilter"
@
getBackData=
"getBackData"
@
editShow=
"hasEditGicPeople=true"
/>
<div>
<el-form-item
style=
"margin-top:50px"
v-show=
"!isDialog"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"submit()"
:loading=
"btnLoading"
>
确认
</el-button>
</el-form-item>
</div>
</el-form>
</
template
>
<
script
>
import
request
from
'@/service/request'
;
export
default
{
props
:
{
isDialog
:
{
default
:
false
,
type
:
Boolean
,
},
},
data
()
{
const
activityTimeVal
=
(
rule
,
value
,
callback
)
=>
{
callback
(
new
Error
(
'请填写'
));
};
return
{
breadcrumbTitle
:
'新建上架规则'
,
fixedWidth
:
document
.
documentElement
.
clientWidth
-
200
,
ruleForm
:
{
memberType
:
1
,
// 1:全部顾客 3 人群筛选 4 门店筛选
},
rules
:
{
ruleTitle
:
[
{
required
:
true
,
message
:
'请填写'
,
trigger
:
'blur'
},
],
activityTime
:
[
{
required
:
true
,
message
:
'请填写'
,
trigger
:
'blur'
,
validator
:
activityTimeVal
},
],
},
projectName
:
'integral-mall'
,
useId
:
''
,
hasSearchData
:
''
,
sceneValue
:
'member'
,
// 场景值
hasEditGicPeople
:
false
,
isEdit
:
this
.
$route
.
meta
.
type
===
'edit'
,
isAdd
:
this
.
$route
.
meta
.
type
===
'add'
,
isCopy
:
this
.
$route
.
meta
.
type
===
'copy'
,
loading
:
false
,
btnLoading
:
false
,
uuid
:
''
,
memberTypeTotal
:
0
,
ruleMemberFilterClose
:
0
,
// 是否关闭人群筛选器
};
},
computed
:
{
storeParams
()
{
return
!
this
.
isAdd
?
{
creatorId
:
this
.
ruleForm
.
creatorId
}
:
{};
},
},
mounted
()
{
if
(
!
this
.
isAdd
)
{
this
.
integralMallProRuleId
=
this
.
$route
.
params
.
id
;
this
.
getDatail
(
this
.
$route
.
params
.
id
);
}
this
.
memberTypeNum
();
const
obj
=
{
edit
:
'编辑上架规则'
,
add
:
'新建上架规则'
,
copy
:
'复制上架规则'
,
};
this
.
breadcrumbTitle
=
obj
[
this
.
$route
.
meta
.
type
];
this
.
getRuleMemberFilterClose
();
},
methods
:
{
// 检测是否开启 人群筛选器
getRuleMemberFilterClose
()
{
request
.
get
(
'/api-integral-mall/get-config'
).
then
(
res
=>
{
const
result
=
res
.
data
.
result
||
{};
this
.
ruleMemberFilterClose
=
result
.
ruleMemberFilterClose
;
});
},
/** 门店筛选器 */
storeChange
(
storeId
)
{
this
.
uuid
=
storeId
;
},
/** 人群筛选器 */
// 获取需要回显的数据, 供保存时候使用
getBackData
(
val
)
{
console
.
log
(
val
);
this
.
ruleForm
.
searchJson
=
val
;
},
// 子组件触发父组件事件,返回过滤条件数据
findFilter
(
val
)
{
console
.
log
(
val
);
this
.
ruleForm
.
filterJson
=
val
;
},
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
;
});
}
}
else
if
(
this
.
ruleForm
.
memberType
==
4
)
{
// 门店筛选器回显
this
.
uuid
=
JSON
.
parse
(
this
.
ruleForm
.
filterJson
).
storeWidgetId
;
}
}
}).
finally
(()
=>
{
this
.
loading
=
false
;
});
},
submitRequest
()
{
this
.
$refs
.
ruleForm
.
validate
(
val
=>
{
if
(
val
)
{
let
data
=
{};
if
(
this
.
isCopy
)
{
const
{
ruleTitle
,
ruleExplanation
,
filterJson
,
memberType
,
searchJson
,
showBack
}
=
this
.
ruleForm
;
data
=
{
ruleTitle
,
ruleExplanation
,
memberType
,
filterJson
,
searchJson
,
showBack
};
}
else
{
data
=
this
.
ruleForm
;
}
this
.
btnLoading
=
true
;
this
.
$emit
(
'btnLoading'
);
request
.
post
(
'/api-integral-mall/add-update-rule'
,
data
).
then
(
res
=>
{
const
integralMallProRuleId
=
res
.
data
.
result
;
if
(
this
.
isDialog
)
{
this
.
$emit
(
'submit'
,
{
...
data
,
integralMallProRuleId
});
}
else
{
this
.
$router
.
go
(
-
1
);
}
}).
finally
(()
=>
{
this
.
$emit
(
'btnStop'
);
this
.
btnLoading
=
false
;
});
}
});
},
async
submit
()
{
if
(
this
.
ruleForm
.
memberType
==
1
)
{
this
.
ruleForm
.
filterJson
=
''
;
this
.
ruleForm
.
searchJson
=
''
;
this
.
ruleForm
.
searchId
=
''
;
this
.
submitRequest
();
}
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
;
this
.
submitRequest
();
});
}
else
{
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
});
this
.
ruleForm
.
searchJson
=
''
;
this
.
ruleForm
.
searchId
=
this
.
uuid
;
this
.
submitRequest
();
});
}
},
echoData
(
filterJson
)
{
// 取得人群筛选器回显文字
const
form
=
new
FormData
();
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
);
},
memberTypeNum
()
{
request
.
get
(
'/api-integral-mall/list-rule'
,
{
params
:
{
memberType
:
3
}
}).
then
(
res
=>
{
this
.
memberTypeTotal
=
res
.
data
.
result
.
length
||
0
;
});
},
},
};
</
script
>
<
style
scoped
>
.gic-people--button
{
background
:
#f2f3f4
;
padding
:
0
0
20px
124px
;
}
</
style
>
src/views/goods/coupon/detail.vue
View file @
2edaff9e
...
...
@@ -1046,7 +1046,7 @@ export default {
this
.
cardList
=
[];
this
.
cardList
=
res
.
data
.
result
;
if
(
this
.
cardList
.
length
===
1
)
{
this
.
cardCouponList
[
0
].
proName
=
this
.
cardList
[
0
].
cardName
;
this
.
cardCouponList
[
0
].
pro
Ref
Name
=
this
.
cardList
[
0
].
cardName
;
this
.
cardCouponList
[
0
].
proRefId
=
this
.
cardList
[
0
].
coupCardId
;
}
if
(
this
.
cardList
)
{
...
...
src/views/goods/gift/detail.vue
View file @
2edaff9e
...
...
@@ -2329,7 +2329,7 @@ export default {
},
// 检测是否开启 erp商品兑换接口
getErpGoodsFlag
()
{
request
.
get
(
'/api-integral-mall/get-
erp-
config'
).
then
(
res
=>
{
request
.
get
(
'/api-integral-mall/get-config'
).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
const
result
=
res
.
data
.
result
||
{};
this
.
$store
.
commit
(
'mutations_erpGoodsFlag'
,
result
.
goodsStockSync
||
0
);
...
...
src/views/goods/gift/info.vue
View file @
2edaff9e
...
...
@@ -2686,7 +2686,7 @@ export default {
},
// 检测是否开启 erp商品兑换接口
getErpGoodsFlag
()
{
request
.
get
(
'/api-integral-mall/get-
erp-
config'
).
then
(
res
=>
{
request
.
get
(
'/api-integral-mall/get-config'
).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
const
result
=
res
.
data
.
result
||
{};
this
.
$store
.
commit
(
'mutations_erpGoodsFlag'
,
result
.
goodsStockSync
||
0
);
...
...
src/views/goods/ruleList/info.vue
View file @
2edaff9e
...
...
@@ -18,262 +18,18 @@
</h3>
</div>
<div
class=
"section"
>
<el-form
ref=
"ruleForm"
:rules=
"rules"
:model=
"ruleForm"
label-width=
"160px"
size=
"small"
v-loading=
"loading"
>
<el-form-item
label=
"上架规则名称"
prop=
"ruleTitle"
>
<el-input
maxlength=
"30"
show-word-limit
placeholder=
"请输入上架规则名称"
v-model=
"ruleForm.ruleTitle"
clearable
@
clear=
"ruleForm.ruleTitle=''"
style=
"width:340px"
/>
</el-form-item>
<el-form-item
label=
"上架规则名称备注"
prop=
"ruleExplanation"
>
<el-input
maxlength=
"50"
show-word-limit
placeholder=
"请输入上架规则说明"
v-model=
"ruleForm.ruleExplanation"
style=
"width:340px"
/>
</el-form-item>
<el-form-item
label=
"适用人群"
prop=
"memberType"
>
<span
class=
"tips"
>
【人群筛选器】类型的上架规则最多支持20条,目前已创建
<span
style=
"color:#1890ff"
>
{{
memberTypeTotal
}}
</span>
条
</span>
<div>
<el-radio
v-model=
"ruleForm.memberType"
:label=
"1"
>
全部客户
</el-radio>
<el-radio
v-model=
"ruleForm.memberType"
:label=
"4"
>
门店筛选
</el-radio>
<el-radio
v-model=
"ruleForm.memberType"
:label=
"3"
:disabled=
"memberTypeTotal>=20&&isAdd"
>
人群筛选器
</el-radio>
</div>
</el-form-item>
<el-form-item
v-show=
"ruleForm.memberType === 4"
>
<vue-gic-store-new
:isAdd=
"isAdd || !uuid"
:uuid
.
sync=
"uuid"
ref=
"storeGroup"
@
store-change=
"storeChange"
/>
</el-form-item>
<el-form-item
v-show=
"ruleForm.memberType === 3"
>
<vue-gic-people
v-bind=
"storeParams"
:projectName=
"projectName"
:triggerReset=
"true"
:useId=
"useId"
:hasSearchData=
"hasSearchData"
:sceneValue=
"sceneValue"
ref=
"peopleFilter"
@
findFilter=
"findFilter"
@
getBackData=
"getBackData"
@
editShow=
"hasEditGicPeople=true"
/>
</el-form-item>
<div>
<el-form-item
style=
"margin-top:50px"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"submit()"
:loading=
"btnLoading"
>
确认
</el-button>
</el-form-item>
</div>
</el-form>
<ruleInfo
/>
</div>
</div>
</div>
</
template
>
<
script
>
import
r
equest
from
'../../../service/request
'
;
import
r
uleInfo
from
'@/components/ruleDetail.vue
'
;
export
default
{
data
()
{
const
activityTimeVal
=
(
rule
,
value
,
callback
)
=>
{
callback
(
new
Error
(
'请填写'
));
};
return
{
breadcrumbTitle
:
'新建上架规则'
,
fixedWidth
:
document
.
documentElement
.
clientWidth
-
200
,
ruleForm
:
{
memberType
:
1
,
// 1:全部顾客 3 人群筛选 4 门店筛选
},
rules
:
{
ruleTitle
:
[
{
required
:
true
,
message
:
'请填写'
,
trigger
:
'blur'
},
],
activityTime
:
[
{
required
:
true
,
message
:
'请填写'
,
trigger
:
'blur'
,
validator
:
activityTimeVal
},
],
},
projectName
:
'integral-mall'
,
useId
:
''
,
hasSearchData
:
''
,
sceneValue
:
'member'
,
// 场景值
hasEditGicPeople
:
false
,
isEdit
:
this
.
$route
.
meta
.
type
===
'edit'
,
isAdd
:
this
.
$route
.
meta
.
type
===
'add'
,
isCopy
:
this
.
$route
.
meta
.
type
===
'copy'
,
loading
:
false
,
btnLoading
:
false
,
uuid
:
''
,
memberTypeTotal
:
0
,
};
components
:
{
ruleInfo
,
},
computed
:
{
storeParams
()
{
return
!
this
.
isAdd
?
{
creatorId
:
this
.
ruleForm
.
creatorId
}
:
{};
},
},
mounted
()
{
if
(
!
this
.
isAdd
)
{
this
.
integralMallProRuleId
=
this
.
$route
.
params
.
id
;
this
.
getDatail
(
this
.
$route
.
params
.
id
);
}
this
.
memberTypeNum
();
const
obj
=
{
edit
:
'编辑上架规则'
,
add
:
'新建上架规则'
,
copy
:
'复制上架规则'
,
};
this
.
breadcrumbTitle
=
obj
[
this
.
$route
.
meta
.
type
];
},
methods
:
{
/** 门店筛选器 */
storeChange
(
storeId
)
{
this
.
uuid
=
storeId
;
},
/** 人群筛选器 */
// 获取需要回显的数据, 供保存时候使用
getBackData
(
val
)
{
console
.
log
(
val
);
this
.
ruleForm
.
searchJson
=
val
;
},
// 子组件触发父组件事件,返回过滤条件数据
findFilter
(
val
)
{
console
.
log
(
val
);
this
.
ruleForm
.
filterJson
=
val
;
},
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
;
});
}
}
else
if
(
this
.
ruleForm
.
memberType
==
4
)
{
// 门店筛选器回显
this
.
uuid
=
JSON
.
parse
(
this
.
ruleForm
.
filterJson
).
storeWidgetId
;
}
}
}).
finally
(()
=>
{
this
.
loading
=
false
;
});
},
submitRequest
()
{
console
.
log
(
this
.
ruleForm
);
this
.
$refs
.
ruleForm
.
validate
(
val
=>
{
if
(
val
)
{
let
data
=
{};
if
(
this
.
isCopy
)
{
const
{
ruleTitle
,
ruleExplanation
,
filterJson
,
memberType
,
searchJson
,
showBack
}
=
this
.
ruleForm
;
data
=
{
ruleTitle
,
ruleExplanation
,
memberType
,
filterJson
,
searchJson
,
showBack
};
}
else
{
data
=
this
.
ruleForm
;
}
this
.
btnLoading
=
true
;
request
.
post
(
'/api-integral-mall/add-update-rule'
,
data
).
then
(
res
=>
{
this
.
$router
.
go
(
-
1
);
}).
finally
(()
=>
{
this
.
btnLoading
=
false
;
});
}
});
},
async
submit
()
{
if
(
this
.
ruleForm
.
memberType
==
1
)
{
this
.
ruleForm
.
filterJson
=
''
;
this
.
ruleForm
.
searchJson
=
''
;
this
.
ruleForm
.
searchId
=
''
;
this
.
submitRequest
();
}
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
;
this
.
submitRequest
();
});
}
else
{
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
});
this
.
ruleForm
.
searchJson
=
''
;
this
.
ruleForm
.
searchId
=
this
.
uuid
;
this
.
submitRequest
();
});
}
},
echoData
(
filterJson
)
{
// 取得人群筛选器回显文字
const
form
=
new
FormData
();
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
);
},
memberTypeNum
()
{
request
.
get
(
'/api-integral-mall/list-rule'
,
{
params
:
{
memberType
:
3
}
}).
then
(
res
=>
{
this
.
memberTypeTotal
=
res
.
data
.
result
.
length
||
0
;
});
},
},
};
</
script
>
...
...
src/views/setting/editDeliver.vue
View file @
2edaff9e
...
...
@@ -818,7 +818,7 @@ export default {
},
// 检测是否开启 erp商品兑换接口
getErpGoodsFlag
()
{
request
.
get
(
'/api-integral-mall/get-
erp-
config'
).
then
(
res
=>
{
request
.
get
(
'/api-integral-mall/get-config'
).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
const
result
=
res
.
data
.
result
||
{};
this
.
$store
.
commit
(
'mutations_erpGoodsFlag'
,
result
.
goodsStockSync
||
0
);
...
...
src/views/setting/pickedAuto.vue
View file @
2edaff9e
...
...
@@ -592,7 +592,7 @@ export default {
},
// 检测是否开启 erp商品兑换接口
getErpGoodsFlag
()
{
request
.
get
(
'/api-integral-mall/get-
erp-
config'
).
then
(
res
=>
{
request
.
get
(
'/api-integral-mall/get-config'
).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
const
result
=
res
.
data
.
result
||
{};
this
.
$store
.
commit
(
'mutations_erpGoodsFlag'
,
result
.
goodsStockSync
||
0
);
...
...
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