Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 543ac090
authored
May 09, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
代金券-加字段(集团版集团账号)
1 parent
2c298503
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
32 deletions
src/views/couponManage/editCashCoupon.vue
src/views/couponManage/editCashCoupon.vue
View file @
543ac09
...
@@ -8,8 +8,7 @@
...
@@ -8,8 +8,7 @@
<div
class=
"card_one"
>
<div
class=
"card_one"
>
<div
class=
"flex"
>
<div
class=
"flex"
>
<div
:class=
"editForm.status == 3 ? 'darkColor' : ''"
class=
"cname"
>
{{
editForm
.
couponName
}}
</div>
<div
:class=
"editForm.status == 3 ? 'darkColor' : ''"
class=
"cname"
>
{{
editForm
.
couponName
}}
</div>
<img
src=
"../../images/unCash.png"
class=
"couponImg"
v-if=
"editForm.status == 3"
/>
<img
class=
"couponImg"
:src=
"require(`../../images/$
{editForm.status == 3 ? 'unCash' : 'cash'}.png`)" />
<img
src=
"../../images/cash.png"
class=
"couponImg"
v-else
/>
</div>
</div>
<!--
<div
class=
"ctype"
>
<!--
<div
class=
"ctype"
>
<div
class=
"ctypeName"
></div>
<div
class=
"ctypeName"
></div>
...
@@ -33,16 +32,13 @@
...
@@ -33,16 +32,13 @@
</div>
</div>
<div
style=
"height: 1px;background-color: rgb(238, 238, 238);margin: 7px 16px 8px;"
></div>
<div
style=
"height: 1px;background-color: rgb(238, 238, 238);margin: 7px 16px 8px;"
></div>
<div
class=
"process"
>
<div
class=
"process"
>
<img
src=
"../../images/unArrow.png"
v-if=
"editForm.status == 3"
/>
<img
:src=
"require(`../../images/$
{editForm.status == 3 ? 'unArrow' : 'arrow'}.png`)" />
<img
src=
"../../images/arrow.png"
v-else
/>
<span
class=
"process_text"
>
导航到店
</span>
<span
class=
"process_text"
>
导航到店
</span>
<img
class=
"rightArrow"
src=
"../../images/rightArrow.png"
/>
<img
class=
"rightArrow"
src=
"../../images/rightArrow.png"
/>
<img
src=
"../../images/unCar.png"
v-if=
"editForm.status == 3"
/>
<img
:src=
"require(`../../images/$
{editForm.status == 3 ? 'unCar' : 'car'}.png`)" />
<img
src=
"../../images/car.png"
v-else
/>
<span
class=
"process_text"
>
开始服务
</span>
<span
class=
"process_text"
>
开始服务
</span>
<img
class=
"rightArrow"
src=
"../../images/rightArrow.png"
/>
<img
class=
"rightArrow"
src=
"../../images/rightArrow.png"
/>
<img
src=
"../../images/unTicket.png"
v-if=
"editForm.status == 3"
/>
<img
:src=
"require(`../../images/$
{editForm.status == 3 ? 'unTicket' : 'ticket'}.png`)" />
<img
src=
"../../images/ticket.png"
v-else
/>
<span
class=
"process_text"
>
出示核销码
</span>
<span
class=
"process_text"
>
出示核销码
</span>
</div>
</div>
</div>
</div>
...
@@ -110,6 +106,11 @@
...
@@ -110,6 +106,11 @@
</el-input>
</el-input>
<span
style=
"color: red; margin-left: 15px"
v-if=
"priceFlag && editForm.useChannel == 1"
>
{{
selectedAllProList
.
length
?
'存在零售价低于代金券的商品'
:
'系统暂无已创建的商品,请先创建好商品后再配置代金券'
}}
</span>
<span
style=
"color: red; margin-left: 15px"
v-if=
"priceFlag && editForm.useChannel == 1"
>
{{
selectedAllProList
.
length
?
'存在零售价低于代金券的商品'
:
'系统暂无已创建的商品,请先创建好商品后再配置代金券'
}}
</span>
</
template
>
</
template
>
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<
template
slot=
"stock"
slot-scope=
"scope"
>
<span
v-if=
"isGroupUp"
>
无库存限制
</span>
<el-input
v-else
class=
"w-150"
v-model=
"editForm[scope.scope.name]"
placeholder=
"请输入库存"
></el-input>
</
template
>
<!-- 只有使用途径为线上商品时才有效,到店核销时屏蔽 -->
<!-- 只有使用途径为线上商品时才有效,到店核销时屏蔽 -->
<
template
slot=
"goodsHtml"
>
<
template
slot=
"goodsHtml"
>
<el-radio
v-model=
"editForm.goods"
label=
"1"
v-if=
"apear == 'couponAdd'"
>
全部商品可用
</el-radio>
<el-radio
v-model=
"editForm.goods"
label=
"1"
v-if=
"apear == 'couponAdd'"
>
全部商品可用
</el-radio>
...
@@ -137,6 +138,10 @@
...
@@ -137,6 +138,10 @@
<el-button
style=
"margin-left: 80px"
@
click=
"editMessage"
>
编辑
</el-button>
<el-button
style=
"margin-left: 80px"
@
click=
"editMessage"
>
编辑
</el-button>
</
template
>
</
template
>
</glsx-combi-form>
</glsx-combi-form>
<div
v-if=
"isGroupUp"
>
<p
class=
"edit-title"
>
适用门店配置
</p>
<glsx-combi-form
class=
"edit-form-container"
ref=
"merchantRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"merchantEditFormData"
:formRules=
"merchantRule"
></glsx-combi-form>
</div>
</div>
</div>
<div
class=
"footer"
:style=
"{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<div
class=
"footer"
:style=
"{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<el-button
type=
"primary"
v-if=
"showSubmit"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"primary"
v-if=
"showSubmit"
@
click=
"handleConfirm"
>
确定
</el-button>
...
@@ -159,10 +164,8 @@ export default {
...
@@ -159,10 +164,8 @@ export default {
userDisable
:
false
,
userDisable
:
false
,
size
:
'small'
,
size
:
'small'
,
title
:
'创建'
,
title
:
'创建'
,
titleObj
:
{
// 集团版集团账号
1
:
'创建晒单'
,
isGroupUp
:
false
,
2
:
'编辑晒单'
},
footerLeft
:
'0'
,
footerLeft
:
'0'
,
footerWidth
:
'0'
,
footerWidth
:
'0'
,
editChildRef
:
'editChildRef'
,
editChildRef
:
'editChildRef'
,
...
@@ -250,7 +253,6 @@ export default {
...
@@ -250,7 +253,6 @@ export default {
width
:
'320px'
,
width
:
'320px'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
20
maxlength
:
20
// index:0
},
},
{
{
label
:
'预估成本/元'
,
label
:
'预估成本/元'
,
...
@@ -258,82 +260,99 @@ export default {
...
@@ -258,82 +260,99 @@ export default {
width
:
'320px'
,
width
:
'320px'
,
type
:
'input'
,
type
:
'input'
,
isDisabled
:
false
isDisabled
:
false
// index:1
},
},
{
{
label
:
'使用途径'
,
label
:
'使用途径'
,
name
:
'useChannel'
,
name
:
'useChannel'
,
addHtml
:
'useChannelHtml'
addHtml
:
'useChannelHtml'
// index:2
},
},
{
{
label
:
'有效期'
,
label
:
'有效期'
,
name
:
'effectiveType'
,
name
:
'effectiveType'
,
addHtml
:
'effectiveHtml'
addHtml
:
'effectiveHtml'
// index:3
},
},
{
{
label
:
'使用限制'
,
label
:
'使用限制'
,
name
:
'useBarriers'
,
name
:
'useBarriers'
,
addHtml
:
'useBarriersHtml'
addHtml
:
'useBarriersHtml'
// index:4
},
},
{
{
label
:
'适用商品'
,
label
:
'适用商品'
,
name
:
'goods'
,
name
:
'goods'
,
addHtml
:
'goodsHtml'
,
addHtml
:
'goodsHtml'
,
isHide
:
false
isHide
:
false
// index:6
},
},
{
{
// label: '门店',
// label: '门店',
name
:
''
,
name
:
''
,
addHtml
:
'proTable'
,
addHtml
:
'proTable'
,
isHide
:
true
isHide
:
true
// index:7
},
},
{
{
label
:
'面值'
,
label
:
'面值'
,
name
:
'denomination'
,
name
:
'denomination'
,
addHtml
:
'denominationHtml'
addHtml
:
'denominationHtml'
// index:8
},
},
{
{
label
:
'库存'
,
label
:
'库存'
,
name
:
'stock'
,
name
:
'stock'
,
width
:
'150px'
,
addHtml
:
'stock'
type
:
'input'
// width: '150px',
//
index:9
//
type: 'input'
},
},
{
{
label
:
'使用规则'
,
label
:
'使用规则'
,
name
:
'directionalFlag'
,
name
:
'directionalFlag'
,
addHtml
:
'directionalFlagHtml'
,
addHtml
:
'directionalFlagHtml'
,
isHide
:
false
isHide
:
false
// index:5
},
},
{
{
label
:
'使用说明'
,
label
:
'使用说明'
,
name
:
'useDescription'
,
name
:
'useDescription'
,
addHtml
:
'useDescriptionHtml'
addHtml
:
'useDescriptionHtml'
// index:10
},
},
{
{
name
:
''
,
name
:
'
editHtml
'
,
addHtml
:
'editHtml'
,
addHtml
:
'editHtml'
,
isHide
:
true
isHide
:
true
// index:11
}
],
// 适用门店
merchantRule
:
{
merchantRadio
:
[{
required
:
true
,
message
:
'请选择适用范围'
,
trigger
:
'change'
}]
},
merchantEditFormData
:
[
{
label
:
'适用范围'
,
name
:
'merchantRadio'
,
type
:
'radio'
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionList
:
[
{
confId
:
'1'
,
confName
:
'旗下所有店通用'
},
{
confId
:
'2'
,
confName
:
'旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
],
}
}
]
]
}
}
},
},
created
()
{
this
.
userInfo
=
this
.
$globalState
.
session
this
.
isGroupUp
=
this
.
userInfo
.
merchantModel
==
1
&&
this
.
userInfo
.
accountLevel
!=
4
this
.
editRule
.
stock
[
0
].
required
=
!
this
.
isGroupUp
},
mounted
()
{
mounted
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
routeInfo
=
this
.
$route
.
params
this
.
routeInfo
=
this
.
$route
.
params
// this.title = this.titleObj[this.routeInfo.addOrEdit]
this
.
getAllGoods
()
this
.
getAllGoods
()
var
id
=
this
.
routeInfo
.
id
var
id
=
this
.
routeInfo
.
id
var
addOrEdit
=
this
.
routeInfo
.
addOrEdit
var
addOrEdit
=
this
.
routeInfo
.
addOrEdit
...
@@ -342,7 +361,8 @@ export default {
...
@@ -342,7 +361,8 @@ export default {
this
.
apear
=
'couponSee'
this
.
apear
=
'couponSee'
this
.
showSubmit
=
false
this
.
showSubmit
=
false
this
.
title
=
'查看'
this
.
title
=
'查看'
this
.
editFormData
[
11
].
isHide
=
false
let
idx
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'editHtml'
)
this
.
editFormData
[
idx
].
isHide
=
false
}
else
if
(
addOrEdit
==
2
)
{
}
else
if
(
addOrEdit
==
2
)
{
this
.
apear
=
'couponEdit'
this
.
apear
=
'couponEdit'
this
.
title
=
'编辑'
this
.
title
=
'编辑'
...
@@ -699,7 +719,13 @@ export default {
...
@@ -699,7 +719,13 @@ export default {
handleConfirm
()
{
handleConfirm
()
{
this
.
validateRules
()
this
.
validateRules
()
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
var
merchantval
=
true
if
(
this
.
isGroupUp
)
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
(
merchantVaild
=>
{
this
.
merchantval
=
merchantVaild
})
}
if
(
valid
&&
merchantval
)
{
if
(
this
.
priceFlag
&&
this
.
editForm
.
useChannel
==
1
)
{
if
(
this
.
priceFlag
&&
this
.
editForm
.
useChannel
==
1
)
{
//存在零售价低于代金券的商品
//存在零售价低于代金券的商品
return
return
...
@@ -745,7 +771,7 @@ export default {
...
@@ -745,7 +771,7 @@ export default {
.
then
(()
=>
{
.
then
(()
=>
{
this
.
cancelJump
()
this
.
cancelJump
()
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
}
else
{
}
else
{
this
.
cancelJump
()
this
.
cancelJump
()
}
}
...
@@ -854,6 +880,10 @@ export default {
...
@@ -854,6 +880,10 @@ export default {
margin-top
:
8px
;
margin-top
:
8px
;
}
}
.w-150
{
width
:
150px
;
}
.link-top
{
.link-top
{
width
:
227px
;
width
:
227px
;
height
:
1px
;
height
:
1px
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment