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 910c1c7f
authored
Nov 23, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优惠券,去掉适用门店;核销列表
1 parent
c55927c0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
281 additions
and
251 deletions
src/views/couponManage/editCashCoupon.vue
src/views/couponManage/editDiscountCoupon.vue
src/views/couponManage/editExchangeCoupon.vue
src/views/couponManage/editMemberService.vue
src/views/couponManage/index.vue
src/views/couponManage/receiveDetail.vue
src/views/couponManage/recordList.vue
src/views/couponManage/editCashCoupon.vue
View file @
910c1c7
...
...
@@ -104,9 +104,8 @@
</el-form-item>
</
template
>
<
template
slot=
"denominationHtml"
>
<el-input
v-model=
"editForm.denomination"
id=
"denomination"
placeholder=
"请输入面值"
:disabled=
"apear != 'couponAdd'"
@
blur
.
native
.
capture=
"editForm.useChannel == 1 && denominationBlur($event)"
>
<!--
<span
slot=
"append"
>
元
</span>
-->
</el-input>
<el-input
v-model=
"editForm.denomination"
id=
"denomination"
placeholder=
"请输入面值"
:disabled=
"apear != 'couponAdd'"
@
blur
.
native
.
capture=
"editForm.useChannel == 1 && denominationBlur($event)"
></el-input>
元
<span
style=
"color: red; margin-left: 15px"
v-if=
"priceFlag && editForm.useChannel == 1"
>
{{
selectedAllProList
.
length
?
'存在零售价低于代金券的商品'
:
'系统暂无已创建的商品,请先创建好商品后再配置代金券'
}}
</span>
...
...
@@ -114,9 +113,10 @@
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<
template
slot=
"stock"
slot-scope=
"scope"
>
<span
v-if=
"$isGroupUp"
>
无库存限制
</span>
<el-input
:disabled=
"apear != 'couponAdd'"
v-else
class=
"w-150"
v-model=
"editForm[scope.scope.name]"
placeholder=
"请输入库存"
>
<!--
<span
slot=
"suffix"
>
张
</span>
-->
</el-input>
<div
v-else
>
<el-input
:disabled=
"apear != 'couponAdd'"
class=
"w-150"
v-model=
"editForm[scope.scope.name]"
placeholder=
"请输入库存"
></el-input>
张
</div>
</
template
>
<!-- 只有使用途径为线上商品时才有效,到店核销时屏蔽 -->
<
template
slot=
"goodsHtml"
>
...
...
@@ -145,11 +145,11 @@
<el-button
style=
"margin-left: 80px"
@
click=
"editMessage"
>
编辑
</el-button>
</
template
>
</glsx-combi-form>
<div
v-if=
"$isGroupUp"
>
<
!-- <
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>
<GLFooter>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
{{ apear != 'couponSee' ? '取消' : '返回' }}
</el-button>
...
...
@@ -202,8 +202,8 @@ export default {
full
:
''
,
goods
:
'1'
,
goodsRefList
:
[],
directionalFlag
:
'1'
,
scopeApplication
:
''
directionalFlag
:
'1'
//
scopeApplication: ''
},
//商品列表
tableParams
:
{
...
...
@@ -297,12 +297,12 @@ export default {
isHide
:
true
},
{
label
:
'面值
/元
'
,
label
:
'面值'
,
name
:
'denomination'
,
addHtml
:
'denominationHtml'
},
{
label
:
'库存
/张
'
,
label
:
'库存'
,
name
:
'stock'
,
addHtml
:
'stock'
// width: '150px',
...
...
@@ -326,29 +326,29 @@ export default {
}
],
// 适用门店
merchantRule
:
{
scopeApplication
:
[{
required
:
true
,
message
:
'请选择适用范围'
,
trigger
:
'change'
}]
},
merchantEditFormData
:
[
{
label
:
'适用范围'
,
name
:
'scopeApplication'
,
type
:
'radio'
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
isDisabled
:
false
,
optionList
:
[
{
confId
:
'1'
,
confName
:
'旗下所有店通用'
},
{
confId
:
'2'
,
confName
:
'旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
]
}
]
//
merchantRule: {
//
scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
//
},
//
merchantEditFormData: [
//
{
//
label: '适用范围',
//
name: 'scopeApplication',
//
type: 'radio',
//
optionId: 'confId',
//
optionLabel: 'confName',
//
isDisabled: false,
//
optionList: [
//
{
//
confId: '1',
//
confName: '旗下所有店通用'
//
},
//
{
//
confId: '2',
//
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
//
}
//
]
//
}
//
]
}
},
...
...
@@ -624,9 +624,9 @@ export default {
this
.
editForm
.
effectiveType
=
this
.
editForm
.
effectiveType
+
''
this
.
editForm
.
useBarriers
=
this
.
editForm
.
useBarriers
+
''
this
.
editForm
.
anticipatedCost
=
(
this
.
editForm
.
anticipatedCost
/
100
).
toFixed
(
2
)
if
(
this
.
$isGroupUp
)
{
this
.
editForm
.
scopeApplication
=
this
.
editForm
.
scopeApplication
+
''
}
//
if (this.$isGroupUp) {
//
this.editForm.scopeApplication = this.editForm.scopeApplication + ''
//
}
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:永久有效
if
(
this
.
editForm
.
effectiveType
==
2
)
{
...
...
@@ -723,9 +723,10 @@ export default {
obj
.
limitStockFlag
=
this
.
$isGroupUp
?
2
:
1
if
(
!
this
.
$isGroupUp
)
{
obj
.
stock
=
form
.
stock
}
else
{
obj
.
scopeApplication
=
form
.
scopeApplication
}
// else {
// obj.scopeApplication = form.scopeApplication
// }
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
obj
.
useType
=
1
//有效期或者间隔天数使用次数
...
...
@@ -758,20 +759,21 @@ export default {
handleConfirm
()
{
this
.
validateRules
()
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
valid
,
errorObj
)
=>
{
var
merchantval
=
true
var
merchantErrorObj
=
[]
if
(
this
.
$isGroupUp
)
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
((
merchantVaild
,
errorObj
)
=>
{
merchantval
=
merchantVaild
merchantErrorObj
=
errorObj
})
}
//
var merchantval = true
//
var merchantErrorObj = []
//
if (this.$isGroupUp) {
//
this.$refs.merchantRef.$refs[this.editChildRef].validate((merchantVaild, errorObj) => {
//
merchantval = merchantVaild
//
merchantErrorObj = errorObj
//
})
//
}
if
(
!
valid
)
{
this
.
whereToGo
(
Object
.
keys
(
errorObj
)[
0
])
}
else
if
(
!
merchantval
)
{
this
.
whereToGo
(
Object
.
keys
(
merchantErrorObj
)[
0
])
}
if
(
valid
&&
merchantval
)
{
// else if (!merchantval) {
// this.whereToGo(Object.keys(merchantErrorObj)[0])
// }
if
(
valid
)
{
if
(
this
.
priceFlag
&&
this
.
editForm
.
useChannel
==
1
)
{
//存在零售价低于代金券的商品
this
.
whereToGo
(
'denomination'
)
...
...
src/views/couponManage/editDiscountCoupon.vue
View file @
910c1c7
...
...
@@ -98,9 +98,8 @@
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<
template
slot=
"stock"
slot-scope=
"scope"
>
<span
v-if=
"$isGroupUp"
>
无库存限制
</span>
<el-input
:disabled=
"apear != 'couponAdd'"
v-else
class=
"w-150"
v-model=
"editForm[scope.scope.name]"
placeholder=
"请输入库存"
>
<!--
<span
slot=
"suffix"
>
张
</span>
-->
</el-input>
<el-input
:disabled=
"apear != 'couponAdd'"
v-else
class=
"w-150"
v-model=
"editForm[scope.scope.name]"
placeholder=
"请输入库存"
></el-input>
张
</
template
>
<
template
slot=
"useDescriptionHtml"
>
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
:autosize=
"
{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" />
...
...
@@ -109,10 +108,10 @@
<el-button
style=
"margin-left: 80px"
@
click=
"editMessage"
>
编辑
</el-button>
</
template
>
</glsx-combi-form>
<div
v-if=
"$isGroupUp"
>
<
!-- <
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>
<GLFooter>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
{{ apear != 'couponSee' ? '取消' : '返回' }}
</el-button>
...
...
@@ -174,8 +173,8 @@ export default {
effectiveDays
:
''
,
anticipatedCost
:
''
,
discountIntensity
:
''
,
directionalFlag
:
'1'
,
scopeApplication
:
''
directionalFlag
:
'1'
//
scopeApplication: ''
},
editRule
:
{
anticipatedCost
:
[{
required
:
true
,
message
:
'请输入预估成本'
,
trigger
:
'change'
}],
...
...
@@ -215,7 +214,7 @@ export default {
addHtml
:
'useLimitHtml'
},
{
label
:
'库存
/张
'
,
label
:
'库存'
,
name
:
'stock'
,
addHtml
:
'stock'
// width: '180px',
...
...
@@ -245,29 +244,29 @@ export default {
}
],
// 适用门店
merchantRule
:
{
scopeApplication
:
[{
required
:
true
,
message
:
'请选择适用范围'
,
trigger
:
'change'
}]
},
merchantEditFormData
:
[
{
label
:
'适用范围'
,
name
:
'scopeApplication'
,
type
:
'radio'
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
isDisabled
:
false
,
optionList
:
[
{
confId
:
'1'
,
confName
:
'旗下所有店通用'
},
{
confId
:
'2'
,
confName
:
'旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
]
}
]
//
merchantRule: {
//
scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
//
},
//
merchantEditFormData: [
//
{
//
label: '适用范围',
//
name: 'scopeApplication',
//
type: 'radio',
//
optionId: 'confId',
//
optionLabel: 'confName',
//
isDisabled: false,
//
optionList: [
//
{
//
confId: '1',
//
confName: '旗下所有店通用'
//
},
//
{
//
confId: '2',
//
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
//
}
//
]
//
}
//
]
}
},
...
...
@@ -397,9 +396,9 @@ export default {
this
.
editForm
.
useBarriers
=
this
.
editForm
.
useBarriers
+
''
this
.
editForm
.
anticipatedCost
=
(
this
.
editForm
.
anticipatedCost
/
100
).
toFixed
(
2
)
this
.
editForm
.
discountIntensity
=
(
this
.
editForm
.
discountIntensity
/
100
).
toFixed
(
2
)
if
(
this
.
$isGroupUp
)
{
this
.
editForm
.
scopeApplication
=
this
.
editForm
.
scopeApplication
+
''
}
//
if (this.$isGroupUp) {
//
this.editForm.scopeApplication = this.editForm.scopeApplication + ''
//
}
//使用限制,满多少元可用
if
(
this
.
editForm
.
useBarriers
==
2
)
{
this
.
editForm
.
full
=
this
.
editForm
.
full
...
...
@@ -479,9 +478,10 @@ export default {
obj
.
limitStockFlag
=
this
.
$isGroupUp
?
2
:
1
if
(
!
this
.
$isGroupUp
)
{
obj
.
stock
=
form
.
stock
}
else
{
obj
.
scopeApplication
=
form
.
scopeApplication
}
// else {
// obj.scopeApplication = form.scopeApplication
// }
//折扣
obj
.
discountIntensity
=
(
form
.
discountIntensity
*
100
).
toFixed
(
0
)
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
...
...
@@ -506,20 +506,21 @@ export default {
handleConfirm
()
{
this
.
validateRules
()
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
valid
,
errorObj
)
=>
{
var
merchantval
=
true
var
merchantErrorObj
=
[]
if
(
this
.
$isGroupUp
)
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
((
merchantVaild
,
errorObj
)
=>
{
merchantval
=
merchantVaild
merchantErrorObj
=
errorObj
})
}
//
var merchantval = true
//
var merchantErrorObj = []
//
if (this.$isGroupUp) {
//
this.$refs.merchantRef.$refs[this.editChildRef].validate((merchantVaild, errorObj) => {
//
merchantval = merchantVaild
//
merchantErrorObj = errorObj
//
})
//
}
if
(
!
valid
)
{
this
.
whereToGo
(
Object
.
keys
(
errorObj
)[
0
])
}
else
if
(
!
merchantval
)
{
this
.
whereToGo
(
Object
.
keys
(
merchantErrorObj
)[
0
])
}
if
(
valid
&&
merchantval
)
{
// else if (!merchantval) {
// this.whereToGo(Object.keys(merchantErrorObj)[0])
// }
if
(
valid
)
{
var
params
=
this
.
getCouponInfoParams
()
let
method
=
''
if
(
params
.
couponId
)
{
...
...
src/views/couponManage/editExchangeCoupon.vue
View file @
910c1c7
...
...
@@ -96,10 +96,10 @@
<el-button
style=
"margin-left: 80px"
@
click=
"editMessage"
>
编辑
</el-button>
</
template
>
</glsx-combi-form>
<div
v-if=
"$isGroupUp"
>
<
!-- <
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>
<GLFooter>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
{{ apear != 'couponSee' ? '取消' : '返回' }}
</el-button>
...
...
@@ -158,8 +158,8 @@ export default {
effectiveTime
:
[],
effectiveDays
:
''
,
anticipatedCost
:
''
,
directionalFlag
:
'1'
,
scopeApplication
:
''
directionalFlag
:
'1'
//
scopeApplication: ''
},
editRule
:
{
anticipatedCost
:
[{
required
:
true
,
message
:
'请输入预估成本'
,
trigger
:
'change'
}],
...
...
@@ -215,29 +215,29 @@ export default {
}
],
// 适用门店
merchantRule
:
{
scopeApplication
:
[{
required
:
true
,
message
:
'请选择适用范围'
,
trigger
:
'change'
}]
},
merchantEditFormData
:
[
{
label
:
'适用范围'
,
name
:
'scopeApplication'
,
type
:
'radio'
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
isDisabled
:
false
,
optionList
:
[
{
confId
:
'1'
,
confName
:
'旗下所有店通用'
},
{
confId
:
'2'
,
confName
:
'旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
]
}
]
//
merchantRule: {
//
scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
//
},
//
merchantEditFormData: [
//
{
//
label: '适用范围',
//
name: 'scopeApplication',
//
type: 'radio',
//
optionId: 'confId',
//
optionLabel: 'confName',
//
isDisabled: false,
//
optionList: [
//
{
//
confId: '1',
//
confName: '旗下所有店通用'
//
},
//
{
//
confId: '2',
//
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
//
}
//
]
//
}
//
]
}
},
...
...
@@ -344,9 +344,9 @@ export default {
this
.
editForm
.
directionalFlag
=
this
.
editForm
.
directionalFlag
+
''
this
.
editForm
.
effectiveType
=
this
.
editForm
.
effectiveType
+
''
this
.
editForm
.
anticipatedCost
=
(
this
.
editForm
.
anticipatedCost
/
100
).
toFixed
(
2
)
if
(
this
.
$isGroupUp
)
{
this
.
editForm
.
scopeApplication
=
this
.
editForm
.
scopeApplication
+
''
}
//
if (this.$isGroupUp) {
//
this.editForm.scopeApplication = this.editForm.scopeApplication + ''
//
}
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:永久有效
if
(
this
.
editForm
.
effectiveType
==
2
)
{
...
...
@@ -409,9 +409,10 @@ export default {
obj
.
limitStockFlag
=
this
.
$isGroupUp
?
2
:
1
if
(
!
this
.
$isGroupUp
)
{
obj
.
stock
=
form
.
stock
}
else
{
obj
.
scopeApplication
=
form
.
scopeApplication
}
// else {
// obj.scopeApplication = form.scopeApplication
// }
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
obj
.
useType
=
1
//有效期或者间隔天数使用次数
...
...
@@ -434,20 +435,21 @@ export default {
handleConfirm
()
{
this
.
validateRules
()
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
valid
,
errorObj
)
=>
{
var
merchantval
=
true
var
merchantErrorObj
=
[]
if
(
this
.
$isGroupUp
)
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
((
merchantVaild
,
errorObj
)
=>
{
merchantval
=
merchantVaild
merchantErrorObj
=
errorObj
})
}
//
var merchantval = true
//
var merchantErrorObj = []
//
if (this.$isGroupUp) {
//
this.$refs.merchantRef.$refs[this.editChildRef].validate((merchantVaild, errorObj) => {
//
merchantval = merchantVaild
//
merchantErrorObj = errorObj
//
})
//
}
if
(
!
valid
)
{
this
.
whereToGo
(
Object
.
keys
(
errorObj
)[
0
])
}
else
if
(
!
merchantval
)
{
this
.
whereToGo
(
Object
.
keys
(
merchantErrorObj
)[
0
])
}
if
(
valid
&&
merchantval
)
{
// else if (!merchantval) {
// this.whereToGo(Object.keys(merchantErrorObj)[0])
// }
if
(
valid
)
{
var
params
=
this
.
getCouponInfoParams
()
let
method
=
''
if
(
params
.
couponId
)
{
...
...
@@ -465,9 +467,9 @@ export default {
this
.
cancelJump
()
}
})
.
finally
(()
=>
{
this
.
loading
=
false
})
.
finally
(()
=>
{
this
.
loading
=
false
})
}
})
},
...
...
src/views/couponManage/editMemberService.vue
View file @
910c1c7
...
...
@@ -60,23 +60,22 @@
</el-radio-group>
</div>
</el-form-item>
<el-form-item
v-if=
"!$isGroupUp"
size=
"small"
label=
"会员价/元:"
prop=
"vipPrice"
>
<el-input
size=
"small"
:disabled=
"disabledContent"
maxlength=
"8"
v-model=
"ruleForm.vipPrice"
placeholder=
"请输入会员价"
@
keyup
.
native=
"ruleForm.vipPrice = oninput(ruleForm.vipPrice)"
>
<!--
<span
slot=
"suffix"
class=
"suffix-label"
>
元
</span>
-->
</el-input>
<el-form-item
v-if=
"!$isGroupUp"
size=
"small"
label=
"会员价:"
prop=
"vipPrice"
>
<el-input
size=
"small"
:disabled=
"disabledContent"
maxlength=
"8"
v-model=
"ruleForm.vipPrice"
placeholder=
"请输入会员价"
@
keyup
.
native=
"ruleForm.vipPrice = oninput(ruleForm.vipPrice)"
></el-input>
元
</el-form-item>
<el-form-item
v-if=
"!$isGroupUp"
size=
"small"
label=
"门店价/元:"
prop=
"shopPrice"
>
<el-input
size=
"small"
:disabled=
"disabledContent"
maxlength=
"8"
v-model=
"ruleForm.shopPrice"
placeholder=
"请输入门店价"
@
keyup
.
native=
"ruleForm.shopPrice = oninput(ruleForm.shopPrice)"
>
<!--
<span
slot=
"suffix"
class=
"suffix-label"
>
元
</span>
-->
</el-input>
<el-form-item
v-if=
"!$isGroupUp"
size=
"small"
label=
"门店价:"
prop=
"shopPrice"
>
<el-input
size=
"small"
:disabled=
"disabledContent"
maxlength=
"8"
v-model=
"ruleForm.shopPrice"
placeholder=
"请输入门店价"
@
keyup
.
native=
"ruleForm.shopPrice = oninput(ruleForm.shopPrice)"
></el-input>
元
</el-form-item>
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<el-form-item
size=
"small"
label=
"库存
/张
:"
prop=
"stock"
>
<el-form-item
size=
"small"
label=
"库存:"
prop=
"stock"
>
<!--
<el-input
size=
"small"
:disabled=
"title == '查看'"
maxlength=
"6"
v-model
.
number=
"ruleForm.stock"
placeholder=
"请输入"
></el-input>
-->
<span
v-if=
"$isGroupUp"
>
无库存限制
</span>
<el-input
:disabled=
"title == '查看'"
v-else
class=
"w-150"
v-model=
"ruleForm.stock"
placeholder=
"请输入库存"
>
<!--
<span
slot=
"suffix"
>
张
</span>
-->
</el-input>
<div
v-else
>
<el-input
:disabled=
"title == '查看'"
class=
"w-150"
v-model=
"ruleForm.stock"
placeholder=
"请输入库存"
></el-input>
张
</div>
</el-form-item>
<el-form-item
size=
"small"
label=
"使用说明:"
prop=
"useDescription"
>
<el-input
size=
"small"
:rows=
"6"
:disabled=
"disabledDescription"
type=
"textarea"
v-model=
"ruleForm.useDescription"
placeholder=
"请输入"
maxlength=
"200"
show-word-limit
></el-input>
...
...
@@ -86,10 +85,10 @@
</el-form-item>
</el-form>
<div
class=
"edit-container"
v-if=
"$isGroupUp"
>
<
!--
<
div
class=
"edit-container"
v-if=
"$isGroupUp"
>
<p
class=
"edit-title"
>
适用门店配置
</p>
<glsx-combi-form
class=
"edit-form-container"
ref=
"merchantRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"ruleForm"
:formData=
"merchantEditFormData"
:formRules=
"merchantRule"
></glsx-combi-form>
</div>
</div>
-->
<!--
<div
class=
"serviceCard"
>
<div
class=
"cardtop"
>
<img
src=
"@/assets/serviceMemberCard.png"
alt=
""
/>
...
...
@@ -229,8 +228,8 @@ export default {
shopPrice
:
''
,
stock
:
''
,
useDescription
:
''
,
daterange
:
[]
,
scopeApplication
:
''
daterange
:
[]
//
scopeApplication: ''
},
copyRuleForm
:
{},
rules
:
{
...
...
@@ -257,29 +256,29 @@ export default {
merchantName
:
''
,
title
:
this
.
$route
.
query
.
title
||
''
,
// 适用门店
merchantRule
:
{
scopeApplication
:
[{
required
:
true
,
message
:
'请选择适用范围'
,
trigger
:
'change'
}]
},
merchantEditFormData
:
[
{
label
:
'适用范围'
,
name
:
'scopeApplication'
,
type
:
'radio'
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
isDisabled
:
false
,
optionList
:
[
{
confId
:
'1'
,
confName
:
'旗下所有店通用'
},
{
confId
:
'2'
,
confName
:
'旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
}
]
}
]
//
merchantRule: {
//
scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
//
},
//
merchantEditFormData: [
//
{
//
label: '适用范围',
//
name: 'scopeApplication',
//
type: 'radio',
//
optionId: 'confId',
//
optionLabel: 'confName',
//
isDisabled: false,
//
optionList: [
//
{
//
confId: '1',
//
confName: '旗下所有店通用'
//
},
//
{
//
confId: '2',
//
confName: '旗下同品牌店通用(根据客户绑定车辆品牌自动筛选出适用门店)'
//
}
//
]
//
}
//
]
}
},
computed
:
{
...
...
@@ -358,9 +357,9 @@ export default {
this
.
ruleForm
=
res
this
.
ruleForm
.
anticipatedCost
=
(
res
.
anticipatedCost
/
100
).
toFixed
(
2
)
this
.
ruleForm
.
customUseLimit
=
res
.
useType
if
(
this
.
$isGroupUp
)
{
this
.
ruleForm
.
scopeApplication
=
res
.
scopeApplication
+
''
}
//
if (this.$isGroupUp) {
//
this.ruleForm.scopeApplication = res.scopeApplication + ''
//
}
if
(
res
.
effectiveType
==
1
)
{
this
.
ruleForm
.
effectiveDays
=
res
.
effectiveDays
}
...
...
@@ -390,20 +389,21 @@ export default {
clearTimeout
(
this
.
timer
)
this
.
timer
=
setTimeout
(()
=>
{
this
.
$refs
[
formName
].
validate
((
valid
,
errorObj
)
=>
{
var
merchantval
=
true
var
merchantErrorObj
=
[]
if
(
this
.
$isGroupUp
)
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
((
merchantVaild
,
errorObj
)
=>
{
merchantval
=
merchantVaild
merchantErrorObj
=
errorObj
})
}
//
var merchantval = true
//
var merchantErrorObj = []
//
if (this.$isGroupUp) {
//
this.$refs.merchantRef.$refs[this.editChildRef].validate((merchantVaild, errorObj) => {
//
merchantval = merchantVaild
//
merchantErrorObj = errorObj
//
})
//
}
if
(
!
valid
)
{
this
.
whereToGo
(
Object
.
keys
(
errorObj
)[
0
])
}
else
if
(
!
merchantval
)
{
this
.
whereToGo
(
Object
.
keys
(
merchantErrorObj
)[
0
])
}
if
(
valid
&&
merchantval
)
{
// else if (!merchantval) {
// this.whereToGo(Object.keys(merchantErrorObj)[0])
// }
if
(
valid
)
{
if
(
this
.
isEdit
==
true
)
{
this
.
updateService
()
}
else
{
...
...
@@ -470,9 +470,10 @@ export default {
params
.
limitStockFlag
=
this
.
$isGroupUp
?
2
:
1
if
(
!
this
.
$isGroupUp
)
{
params
.
stock
=
this
.
ruleForm
.
stock
}
else
{
params
.
scopeApplication
=
this
.
ruleForm
.
scopeApplication
}
// else {
// params.scopeApplication = this.ruleForm.scopeApplication
// }
params
.
useDescription
=
this
.
ruleForm
.
useDescription
params
.
discountType
=
7
...
...
@@ -620,8 +621,8 @@ export default {
.radioGroupWrap
{
width
:
550px
;
height
:
164px
;
background-color
:
#f9f9f9
;
padding-top
:
10px
;
//
background-color
:
#f9f9f9
;
//
padding-top
:
10px
;
padding-left
:
20px
;
}
}
...
...
src/views/couponManage/index.vue
View file @
910c1c7
...
...
@@ -241,17 +241,17 @@ export default {
width
:
'100px'
,
addHtml
:
'status'
},
{
label
:
'适用范围'
,
name
:
'scopeApplication'
,
width
:
160
,
formatter
:
cellValue
=>
{
return
{
1
:
'旗下所有店通用'
,
2
:
'旗下品牌店通用'
}[
cellValue
.
scopeApplication
]
}
},
//
{
//
label: '适用范围',
//
name: 'scopeApplication',
//
width: 160,
//
formatter: cellValue => {
//
return {
//
1: '旗下所有店通用',
//
2: '旗下品牌店通用'
//
}[cellValue.scopeApplication]
//
}
//
},
{
label
:
'已领取'
,
prop
:
'getAmount'
...
...
@@ -320,10 +320,10 @@ export default {
created
()
{
this
.
userInfo
=
this
.
$globalState
.
session
if
(
!
this
.
$isGroupUp
)
{
let
idx
=
this
.
tableParams
.
tableColumns
.
findIndex
(
item
=>
item
.
label
==
'适用范围'
)
this
.
tableParams
.
tableColumns
.
splice
(
idx
,
1
)
}
//
if (!this.$isGroupUp) {
//
let idx = this.tableParams.tableColumns.findIndex(item => item.label == '适用范围')
//
this.tableParams.tableColumns.splice(idx, 1)
//
}
},
mounted
()
{
...
...
src/views/couponManage/receiveDetail.vue
View file @
910c1c7
...
...
@@ -104,10 +104,10 @@ export default {
label
:
'有效期'
,
name
:
'effectiveTxt'
},
{
label
:
'适用范围'
,
name
:
'scopeApplicationTxt'
},
//
{
//
label: '适用范围',
//
name: 'scopeApplicationTxt'
//
},
{
label
:
'发行库存'
,
name
:
'limitStockFlag'
,
...
...
@@ -268,10 +268,10 @@ export default {
components
:
{},
created
()
{
if
(
!
this
.
$isGroupUp
)
{
let
idx
=
this
.
couponFormData
.
findIndex
(
item
=>
item
.
label
==
'适用范围'
)
this
.
couponFormData
.
splice
(
idx
,
1
)
}
//
if (!this.$isGroupUp) {
//
let idx = this.couponFormData.findIndex(item => item.label == '适用范围')
//
this.couponFormData.splice(idx, 1)
//
}
},
mounted
()
{
...
...
@@ -348,13 +348,13 @@ export default {
}
}
// 适用范围
if
(
this
.
$isGroupUp
)
{
this
.
coupon
.
scopeApplicationTxt
=
{
1
:
'旗下所有店通用'
,
2
:
'旗下品牌店通用'
}[
coupon
.
scopeApplication
]
||
'-'
}
//
if (this.$isGroupUp) {
//
this.coupon.scopeApplicationTxt =
//
{
//
1: '旗下所有店通用',
//
2: '旗下品牌店通用'
//
}[coupon.scopeApplication] || '-'
//
}
})
},
...
...
src/views/couponManage/recordList.vue
View file @
910c1c7
...
...
@@ -75,12 +75,32 @@ export default {
// 搜索
searchFormData
:
[
{
label
:
'核销码'
,
name
:
'verificationCode'
,
type
:
'input'
,
label
:
'发放门店'
,
name
:
''
,
labelWidth
:
56
,
maxlength
:
50
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'discountTypeList'
},
{
label
:
'核销门店'
,
name
:
''
,
labelWidth
:
56
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionsName
:
'discountTypeList'
},
// {
// label: '核销门店',
// name: 'verificationMerchantName',
// type: 'input',
// isHide: false,
// maxlength: 50
// },
{
label
:
'券名称'
,
name
:
'couponName'
,
...
...
@@ -98,13 +118,6 @@ export default {
optionsName
:
'discountTypeList'
},
{
label
:
'核销门店'
,
name
:
'verificationMerchantName'
,
type
:
'input'
,
isHide
:
false
,
maxlength
:
50
},
{
label
:
'核销人'
,
name
:
'verificationOperator'
,
type
:
'input'
,
...
...
@@ -121,6 +134,13 @@ export default {
maxlength
:
11
},
{
label
:
'核销码'
,
name
:
'verificationCode'
,
type
:
'input'
,
labelWidth
:
56
,
maxlength
:
50
},
{
label
:
'核销日期'
,
name
:
'daterange'
,
type
:
'datePicker'
,
...
...
@@ -147,16 +167,11 @@ export default {
tableOption
:
false
,
tableColumns
:
[
{
label
:
'核销码'
,
prop
:
'verificationCode'
,
width
:
200
},
{
label
:
'用户信息'
,
label
:
'核销用户'
,
prop
:
'userName'
,
width
:
220
,
formatter
:
cellValue
=>
{
return
cellValue
.
userName
+
' '
+
cellValue
.
phone
return
(
cellValue
.
userName
||
''
)
+
' '
+
cellValue
.
phone
}
},
{
...
...
@@ -180,6 +195,10 @@ export default {
}
},
{
label
:
'发放门店'
,
prop
:
''
},
{
label
:
'核销门店'
,
prop
:
'verificationMerchantName'
},
...
...
@@ -188,6 +207,11 @@ export default {
prop
:
'verificationOperator'
},
{
label
:
'核销码'
,
prop
:
'verificationCode'
,
width
:
200
},
{
label
:
'券来源'
,
prop
:
'packageName'
,
addHtml
:
'packageName'
,
...
...
@@ -246,9 +270,9 @@ export default {
if
(
this
.
$isGroupUp
)
{
this
.
getPackageList
()
}
this
.
showOrHideAttr
(
'searchFormData'
,
this
.
$isGroupUp
?
'核销人'
:
'
核销门店
'
,
true
)
this
.
showOrHideAttr
(
'searchFormData'
,
this
.
$isGroupUp
?
'核销人'
:
''
,
true
)
!
this
.
$isGroupUp
&&
this
.
showOrHideAttr
(
'searchFormData'
,
'券来源'
,
true
)
this
.
deleteAttr
(
this
.
$isGroupUp
?
[
'核销人'
]
:
[
'核销门店'
])
this
.
deleteAttr
(
this
.
$isGroupUp
?
[
'核销人'
]
:
[])
},
mounted
()
{
...
...
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