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
7a24255c
Commit
7a24255c
authored
Feb 08, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
4244f6b0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
225 additions
and
78 deletions
+225
-78
historyData.vue
src/components/historyData.vue
+98
-0
updateInfo.vue
src/components/updateInfo.vue
+1
-8
visible.vue
src/components/visible.vue
+7
-10
common.js
src/utils/common.js
+8
-1
coupon.vue
src/views/goods/coupon/coupon.vue
+3
-1
detail.vue
src/views/goods/coupon/detail.vue
+53
-31
detail.vue
src/views/goods/gift/detail.vue
+50
-24
gift.vue
src/views/goods/gift/gift.vue
+5
-3
No files found.
src/components/historyData.vue
0 → 100644
View file @
7a24255c
<
template
>
<el-dialog
title=
"查看当前商品历史配置数据"
:visible
.
sync=
"dialogVisible"
width=
"750px"
:before-close=
"handleClose"
>
<span>
提示:以下数据为快照,不生效,需要在上架规则中配置完成才能生效
</span>
<el-form
ref=
"form"
:model=
"giftForm"
label-position=
"right"
style=
"margin-top: 20px"
label-width=
"100px"
>
<el-form-item
label=
"展现门店"
style=
"position:relative"
>
<el-tooltip
class=
"tips-content"
effect=
"dark"
popper-class=
"store-tips"
placement=
"top-start"
>
<div
slot=
"content"
style=
"line-height:18px"
>
会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见
</div>
<i
class=
"iconfont icon-xinxixianshi"
style=
"color:#1890ff"
/>
</el-tooltip>
<vue-gic-store-linkage
v-if=
"giftForm.useNewStoreWidget === 0 &&giftForm.creatorId "
style=
"margin-left:10px"
:creatorId=
"giftForm.creatorId"
:disabled=
"true"
:openFlag=
"giftForm.openFlag"
@
getDisGroupList=
"getDisGroupList"
:msg=
"giftForm.sendChildData"
ref=
"selectTree"
/>
<span
v-if=
"giftForm.useNewStoreWidget === 0&&giftForm.sendChildData.storeType === 1"
class=
"store-tip"
style=
"display: contents;"
>
若选中的父分组下有新增的门店分组,系统不会默认选中此新增门店分组,请重新确认选择并保存礼品
</span>
<vue-gic-store-card
v-show=
"giftForm.useNewStoreWidget === 1"
style=
"margin-left:10px"
class=
"pt10"
ref=
"storeCard"
:readonly=
"true"
:uuid
.
sync=
"giftForm.uuid"
scenes
/>
</el-form-item>
</el-form>
</el-dialog>
</
template
>
<
script
>
export
default
{
props
:
{
form
:
Object
,
},
data
()
{
return
{
dialogVisible
:
false
,
giftForm
:
{
useNewStoreWidget
:
1
,
openFlag
:
false
,
creatorId
:
''
,
sendChildData
:
{
// 公共组件的值
storeType
:
1
,
storeGroupIds
:
''
,
storeIds
:
[],
},
uuid
:
''
,
},
// 表单的值
};
},
watch
:
{
form
:
{
handler
(
val
)
{
this
.
giftForm
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
if
(
this
.
giftForm
.
useNewStoreWidget
==
1
)
{
this
.
$nextTick
(
_
=>
{
this
.
$refs
.
storeCard
&&
this
.
$refs
.
storeCard
.
init
();
});
}
},
immediate
:
true
,
},
},
methods
:
{
handleClose
()
{
this
.
dialogVisible
=
false
;
},
showPop
()
{
this
.
dialogVisible
=
true
;
},
},
};
</
script
>
src/components/updateInfo.vue
View file @
7a24255c
...
...
@@ -5,19 +5,12 @@
为了提供更好的服务,积分商城商品系统升级,升级后可设置【上架规则】,
<br>
编辑前需要清除当前商品的【展现门店】,
<span
style=
"color:#F5222D;"
>
操作不可逆
</span>
;不升级则当前页面配置继续生效。
</div>
<el-button
type=
"primary"
size=
"small"
@
click=
"update"
>
去编辑
</el-button>
</div>
</
template
>
<
script
>
export
default
{
methods
:
{
update
()
{
this
.
$emit
(
'update'
);
},
},
};
</
script
>
...
...
src/components/visible.vue
View file @
7a24255c
...
...
@@ -8,12 +8,6 @@
label-position=
"right"
style=
"margin-top: 20px"
>
<el-form-item
label=
"上架规则"
prop=
"ruleTitle"
v-if=
"isNew"
>
<span
class=
"ruleTitle"
v-show=
"giftForm.ruleTitle"
>
{{
giftForm
.
ruleTitle
}}
</span>
<el-button
small
type=
"text"
@
click=
"openRelating"
>
修改上架规则
</el-button>
</el-form-item>
<el-form-item
label=
"上架时间"
prop=
"releaseType"
>
<el-radio-group
v-model=
"giftForm.releaseType"
>
<el-radio
:label=
"1"
>
...
...
@@ -50,10 +44,15 @@
<span
class=
"tips"
>
开启后,未开卡客户在积分商城也可见该礼品(前提是该礼品的“适用会员”包含最低会员卡等级)
</span>
</div>
</el-form-item>
<el-form-item
label=
"上架规则"
prop=
"ruleTitle"
v-if=
"isNew"
>
<span
class=
"ruleTitle"
v-show=
"giftForm.ruleTitle"
>
{{
giftForm
.
ruleTitle
}}
</span>
<el-button
small
type=
"text"
@
click=
"openRelating"
>
修改上架规则
</el-button>
</el-form-item>
<!-- 老数据兼容 -->
<el-form-item
label=
"展现门店"
required
style=
"position:relative"
v-if=
"!isNew"
>
...
...
@@ -69,7 +68,7 @@
<i
class=
"iconfont icon-xinxixianshi"
style=
"color:#1890ff"
/>
</el-tooltip>
<vue-gic-store-linkage
v-if=
"giftForm.useNewStoreWidget === 0 &&
(giftForm.creatorId|| showComponent)
"
v-if=
"giftForm.useNewStoreWidget === 0 &&
giftForm.creatorId
"
style=
"margin-left:10px"
:creatorId=
"giftForm.creatorId"
:disabled=
"true"
...
...
@@ -103,12 +102,10 @@ export default {
},
props
:
{
form
:
Object
,
configuration
:
Object
,
isNew
:
{
type
:
Boolean
,
default
:
false
,
},
isAdd
:
Boolean
,
},
data
()
{
return
{
...
...
src/utils/common.js
View file @
7a24255c
...
...
@@ -99,5 +99,12 @@ export default {
second
>=
10
?
(
second
=
second
)
:
(
second
=
'0'
+
second
);
//判断小于10的秒的情况
return
year
+
'-'
+
month
+
'-'
+
date
+
' '
+
hour
+
':'
+
minute
+
':'
+
second
;
}
},
uploadAction
:
function
()
{
let
url
=
window
.
location
.
origin
+
'/api-plug/upload-img?requestProject=integral-mall'
;
if
(
window
.
location
.
origin
.
indexOf
(
'localhost'
)
!=
-
1
)
{
url
=
'http://gicdev.demogic.com/api-plug/upload-img?requestProject=integral-mall'
;
}
return
url
;
},
};
src/views/goods/coupon/coupon.vue
View file @
7a24255c
...
...
@@ -322,6 +322,9 @@
>
<p>
{{
row
.
ruleTitle
.
slice
(
0
,
5
)
+
'...'
}}
</p>
</el-tooltip>
<p
v-if=
"!row.ruleTitle"
>
- -
</p>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
min-width=
"180px"
>
...
...
@@ -579,7 +582,6 @@ export default {
};
},
created
()
{
console
.
log
(
this
.
$buttonCode
);
if
(
localStorage
.
getItem
(
'couponListObj'
))
{
this
.
couponListObj
=
JSON
.
parse
(
localStorage
.
getItem
(
'couponListObj'
));
this
.
currentPage
=
this
.
couponListObj
.
currentPage
;
...
...
src/views/goods/coupon/detail.vue
View file @
7a24255c
...
...
@@ -17,7 +17,7 @@
<span>
{{
mallProId
===
'-1'
?
'新建'
:
'编辑'
}}
优惠券
</span>
</h3>
</div>
<updateInfo
@
update=
"update"
v-if=
"!isNew"
v-loading=
"submitLoading"
/>
<updateInfo
v-if=
"!isNew"
v-loading=
"submitLoading"
/>
<div
class=
"section"
v-loading=
"submitLoading"
>
<el-form
:model=
"couponForm"
...
...
@@ -243,6 +243,25 @@
</el-form-item>
</div>
<div
class=
"section-content"
>
<h3>
可见配置
<span
class=
"sub_title"
>
该配置决定客户是否可见
</span>
<el-button
type=
"text"
style=
"position: absolute;right: 20%;"
@
click=
"readHistoryData"
v-show=
"isNew&&(visibleData.useNewStoreWidget==0 || (visibleData.uuid && visibleData.useNewStoreWidget == 1))"
>
查看当前商品历史配置数据
</el-button>
</h3>
<visible-setting
ref=
"visibleSetting"
:form=
"visibleData"
:isAdd=
"isAdd"
:isNew=
"isNew"
/>
</div>
<div
class=
"section-content"
>
<h3>
可兑换配置
<span
class=
"sub_title"
>
该配置决定客户是否可以兑换
</span></h3>
<el-form-item
label=
"适用会员"
prop=
"gradeType"
v-if=
"cliqueStatus"
>
<el-radio-group
v-model=
"couponForm.gradeType"
@
change=
"handleChange"
>
...
...
@@ -448,23 +467,17 @@
</p>
</div>
</div>
<dm-sub-title
line
style=
"margin-left: 20px;"
>
可见配置
<span
class=
"sub_title"
>
该配置决定客户是否可见
</span>
<el-button
type=
"text"
style=
"position: absolute;right: 20%;"
v-show=
"!isNew"
>
查看当前商品历史配置数据
</el-button>
</dm-sub-title>
<div
class=
"section-content"
>
<visible-setting
ref=
"visibleSetting"
:form=
"visibleData"
:isAdd=
"isAdd"
:isNew=
"isNew"
/>
</div>
<div
class=
"confim-btn"
:style=
"{ width: fixedWidth + 'px' }"
>
<el-form-item
class=
"fix-btn"
>
<!-- <el-button type="primary" size="small" @click="submitForm('couponForm')" :disabled="!canEdit" :loading="submitLoading">保存</el-button> -->
<el-button
type=
"primary"
@
click=
"clearHistoryData"
size=
"small"
v-show=
"!isNew"
>
清除门店数据
</el-button>
<el-button
type=
"primary"
size=
"small"
...
...
@@ -492,6 +505,7 @@
@
selectCard=
"selectCard"
ref=
"dmcard"
/>
<historyData
ref=
"historyData"
:form=
"visibleData"
/>
</div>
</template>
...
...
@@ -503,11 +517,13 @@ import getInputVal from '../../../utils/common.js';
import
tinymceEdit
from
'../../../components/tinymce-edit'
;
import
visibleSetting
from
'@/components/visible'
;
import
updateInfo
from
'@/components/updateInfo'
;
import
historyData
from
'@/components/historyData'
;
export
default
{
components
:
{
tinymceEdit
,
visibleSetting
,
updateInfo
,
historyData
,
},
data
()
{
const
validateTime
=
(
rule
,
value
,
callback
)
=>
{
...
...
@@ -545,10 +561,8 @@ export default {
cash
:
''
,
list2
:
[],
ladderMemberGradeChange
:
[],
getTimeAll
:
getInputVal
.
formatDate
,
getTime
:
getInputVal
.
getTime
,
getTime2
:
getInputVal
.
getTime2
,
getHours
:
getInputVal
.
getHours
,
fixedWidth
:
document
.
documentElement
.
clientWidth
-
200
,
// 卡券数据
// 可传参数
...
...
@@ -587,8 +601,7 @@ export default {
dataDialogueId
:
''
,
// 数据对话id
ladder
:
[],
},
uploadAction
:
window
.
location
.
origin
+
'/api-plug/upload-img?requestProject=integral-mall'
,
// uploadAction: 'http://gicdev.demogic.com/api-plug/upload-img?requestProject=integral-mall',
uploadAction
:
getInputVal
.
uploadAction
(),
headersUpload
:
{
sign
:
''
,
},
...
...
@@ -652,7 +665,7 @@ export default {
},
uuid
:
''
,
},
// 可见配置的数据源
isNew
:
fals
e
,
// 编辑旧商品时,是否确认转换为新数据格式
isNew
:
tru
e
,
// 编辑旧商品时,是否确认转换为新数据格式
};
},
mounted
()
{
...
...
@@ -678,13 +691,22 @@ export default {
document
.
documentElement
.
scrollTop
=
0
;
},
methods
:
{
update
()
{
this
.
isNew
=
true
;
this
.
jump
();
clearHistoryData
()
{
this
.
$confirm
(
'是否确认清除【展示门店数据】?清除后,可进入升级后的编辑页面。'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
showCancelButton
:
false
,
type
:
'warning'
,
}).
then
(()
=>
{
this
.
jump
(
3
);
this
.
isNew
=
true
;
});
},
jump
()
{
readHistoryData
()
{
this
.
$refs
.
historyData
.
showPop
();
},
jump
(
index
)
{
const
jump
=
document
.
querySelectorAll
(
'.section-content'
);
const
total
=
jump
[
4
].
offsetTop
;
const
total
=
jump
[
index
].
offsetTop
;
let
distance
=
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
;
const
step
=
total
/
50
;
if
(
total
>
distance
)
{
...
...
@@ -987,6 +1009,8 @@ export default {
this
.
visibleData
.
ruleTitle
=
ruleTitle
;
this
.
visibleData
.
integralMallProRuleId
=
integralMallProRuleId
;
this
.
isNew
=
true
;
}
else
{
this
.
isNew
=
false
;
}
if
(
useNewStoreWidget
==
0
)
{
// 使用老的门店控件 (兼容老数据)
const
type
=
Number
(
showStore
);
...
...
@@ -1413,6 +1437,8 @@ export default {
margin-bottom
:
25px
;
padding-left
:
32px
;
font-size
:
16px
;
display
:
flex
;
align-items
:
center
;
}
.section-content
.el-form-item
{
margin-left
:
32px
;
...
...
@@ -1599,11 +1625,7 @@ export default {
background: #f2f3f4;
padding: 0 0 20px 124px;
} */
.store-tips
{
width
:
200px
;
position
:
absolute
;
left
:
-10px
;
}
.card-style.el-tabs--border-card
{
box-shadow
:
none
!important
;
}
...
...
src/views/goods/gift/detail.vue
View file @
7a24255c
...
...
@@ -17,7 +17,7 @@
<span>
{{
giftId
===
'-1'
?
'新建'
:
'编辑'
}}{{
giftType
===
1
?
'实物'
:
'虚拟'
}}
礼品
</span>
</h3>
</div>
<updateInfo
@
update=
"update"
v-if=
"!isNew"
v-loading=
"submitLoading"
/>
<updateInfo
v-if=
"!isNew"
v-loading=
"submitLoading"
/>
<div
class=
"section"
v-loading=
"submitLoading"
>
<el-form
:model=
"giftForm"
...
...
@@ -241,6 +241,24 @@
</div>
</el-form-item>
</div>
<div
class=
"section-content"
>
<h3>
可兑换配置
<span
class=
"sub_title"
>
该配置决定客户是否可以兑换
</span><el-button
type=
"text"
style=
"position: absolute;right: 20%;"
@
click=
"readHistoryData"
v-show=
"isNew&&(visibleData.useNewStoreWidget==0 || (visibleData.uuid && visibleData.useNewStoreWidget == 1))"
>
查看当前商品历史配置数据
</el-button>
</h3>
<visible-setting
ref=
"visibleSetting"
:form=
"visibleData"
:isNew=
"isNew"
/>
</div>
<div
class=
"section-content"
>
<h3>
可兑换配置
<span
class=
"sub_title"
>
该配置决定客户是否可以兑换
</span></h3>
<el-form-item
label=
"适用会员"
prop=
"gradeType"
v-if=
"cliqueStatus"
>
...
...
@@ -587,20 +605,6 @@
</el-table>
</div>
</div>
<dm-sub-title
line
style=
"margin-left: 20px;"
>
可见配置
<span
class=
"sub_title"
>
该配置决定客户是否可见
</span>
<el-button
type=
"text"
style=
"position: absolute;right: 20%;"
v-show=
"visibleData.useNewStoreWidget==0 || (visibleData.storeWidgetId !=null && visibleData.useNewStoreWidget == 1)"
>
查看当前商品历史配置数据
</el-button>
</dm-sub-title>
<div
class=
"section-content"
>
<visible-setting
ref=
"visibleSetting"
:form=
"visibleData"
:isAdd=
"isAdd"
:isNew=
"isNew"
/>
</div>
<div
class=
"section-content section-tip-content"
>
<h3>
售后服务
</h3>
<el-form-item
label=
"支持买家申请退款"
prop=
"refundType"
label-width=
"150px"
>
...
...
@@ -627,6 +631,14 @@
<el-form-item
class=
"fix-btn"
>
<el-button
type=
"primary"
@
click=
"clearHistoryData"
size=
"small"
v-show=
"!isNew"
>
清除门店数据
</el-button>
<el-button
type=
"primary"
@
click=
"submitGoodsForm('giftForm')"
size=
"small"
:disabled=
"isDetail==1"
...
...
@@ -686,6 +698,7 @@
</span>
</el-dialog>
<importCoupon
:importCouponModal=
"importCouponModal"
@
getSuceessNum=
"getSuceessNum"
/>
<historyData
ref=
"historyData"
:form=
"visibleData"
/>
</div>
</template>
...
...
@@ -704,6 +717,7 @@ import pickUpStore from '../../../components/store/store';
import
draggable
from
'vuedraggable'
;
import
visibleSetting
from
'@/components/visible'
;
import
updateInfo
from
'@/components/updateInfo'
;
import
historyData
from
'@/components/historyData'
;
export
default
{
data
()
{
const
validateTime
=
(
rule
,
value
,
callback
)
=>
{
...
...
@@ -739,10 +753,8 @@ export default {
cash
:
''
,
list2
:
[],
ladderMemberGradeChange
:
[],
getTimeAll
:
getInputVal
.
formatDate
,
getTime
:
getInputVal
.
getTime
,
getTime2
:
getInputVal
.
getTime2
,
getHours
:
getInputVal
.
getHours
,
fixedWidth
:
document
.
documentElement
.
clientWidth
-
200
,
projectName
:
'integral-mall'
,
giftType
:
''
,
// 礼品类型 实物是1虚拟是0
...
...
@@ -802,8 +814,7 @@ export default {
refundType
:
[{
required
:
true
,
message
:
'请选择售后方式'
,
trigger
:
'change'
}],
},
refundTypeStatus
:
false
,
uploadAction
:
window
.
location
.
origin
+
'/api-plug/upload-img?requestProject=integral-mall'
,
// uploadAction: 'http://gicdev.demogic.com/api-plug/upload-img?requestProject=integral-mall',
uploadAction
:
getInputVal
.
uploadAction
(),
headersUpload
:
{
sign
:
''
,
},
...
...
@@ -894,7 +905,7 @@ export default {
},
uuid
:
''
,
},
isNew
:
fals
e
,
// 编辑旧商品时,是否确认转换为新数据格式
isNew
:
tru
e
,
// 编辑旧商品时,是否确认转换为新数据格式
};
},
mounted
()
{
...
...
@@ -946,9 +957,18 @@ export default {
},
methods
:
{
update
()
{
this
.
isNew
=
true
;
this
.
jump
(
4
);
clearHistoryData
()
{
this
.
$confirm
(
'是否确认清除【展示门店数据】?清除后,可进入升级后的编辑页面。'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
showCancelButton
:
false
,
type
:
'warning'
,
}).
then
(()
=>
{
this
.
jump
(
2
);
this
.
isNew
=
true
;
});
},
readHistoryData
()
{
this
.
$refs
.
historyData
.
showPop
();
},
// 阶梯价定制,判断达摩测试环境与地素环境
// 达摩测试 ff8080815dacd3a2015dacd3ef5c0000
...
...
@@ -1496,6 +1516,8 @@ export default {
this
.
visibleData
.
ruleTitle
=
ruleTitle
;
this
.
visibleData
.
integralMallProRuleId
=
integralMallProRuleId
;
this
.
isNew
=
true
;
}
else
{
this
.
isNew
=
false
;
}
if
(
useNewStoreWidget
==
0
)
{
// 使用老的门店控件 (兼容老数据)
const
type
=
Number
(
showStore
);
...
...
@@ -2368,7 +2390,8 @@ export default {
pickUpStore
,
draggable
,
visibleSetting
,
updateInfo
updateInfo
,
historyData
}
};
</
script
>
...
...
@@ -2389,6 +2412,8 @@ export default {
margin-bottom
:
25px
;
padding-left
:
32px
;
font-size
:
16px
;
display
:
flex
;
align-items
:
center
;
}
.section-content1
h3
{
height
:
55px
;
...
...
@@ -2398,6 +2423,7 @@ export default {
margin-bottom
:
25px
;
padding-left
:
32px
;
font-size
:
16px
;
}
.section-content
.el-form-item
{
margin-left
:
32px
;
...
...
src/views/goods/gift/gift.vue
View file @
7a24255c
...
...
@@ -339,13 +339,16 @@
{{
row
.
ruleTitle
}}
</p>
<el-tooltip
v-if=
"
row.ruleTitle&& row.ruleTitle.length>5"
v-if=
"row.ruleTitle&& row.ruleTitle.length>5"
:content=
"row.ruleTitle"
effect=
"dark"
placement=
"top-start"
>
<p>
{{
row
.
ruleTitle
.
slice
(
0
,
5
)
+
'...'
}}
</p>
</el-tooltip>
<p
v-if=
"!row.ruleTitle"
>
- -
</p>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
min-width=
"220px"
>
...
...
@@ -361,7 +364,7 @@
</el-button>
<el-button
type=
"text"
v-if=
"
scope.row.newRuleFlag!=1
&& $getButtonLimit($buttonCode.giftRelating)"
v-if=
"
(scope.row.newRuleFlag!=1 || !scope.row.ruleTitle)
&& $getButtonLimit($buttonCode.giftRelating)"
@
click=
"relating(scope.row)"
:limit-code=
"$buttonCode.giftRelating"
>
...
...
@@ -763,7 +766,6 @@ export default {
this
.
ladderDialogVisible
=
true
;
},
closeUpdateLadder
()
{
console
.
log
(
111
);
this
.
ladderDialogVisible
=
false
;
this
.
getList
();
},
...
...
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