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 f1883567
authored
Mar 28, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'wuwx_dev_v2.0.0' into 'v2.0.0'
修改代码格式,屏蔽业务类型 See merge request
!62
2 parents
c0d65f27
764c5543
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
79 deletions
src/views/couponManage/editCashCoupon.vue
src/views/productGroup/editProduct.vue
src/views/couponManage/editCashCoupon.vue
View file @
f188356
...
...
@@ -33,7 +33,7 @@
<el-radio
v-model=
"editForm.useChannel"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
线上商品
</el-radio>
<el-radio
v-model=
"editForm.useChannel"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
到店核销
</el-radio>
</
template
>
<
template
slot=
"directionalFlagHtml"
v-if=
"editForm.useChannel != 1"
>
<
template
slot=
"directionalFlagHtml"
>
<div>
<el-radio
v-model=
"editForm.directionalFlag"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
所有客户可用
</el-radio>
<span
class=
"promptCopy"
>
创建成功后立即生效,所有小程序用户均可领用
</span>
...
...
@@ -42,21 +42,11 @@
<el-radio
v-model=
"editForm.directionalFlag"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
定向礼包专用
</el-radio>
<span
class=
"promptCopy"
>
企微员工通过企微工作台定向礼包发送给客户
</span>
</div>
<div>
<div
v-if=
"editForm.useChannel != 1"
>
<el-radio
v-model=
"editForm.directionalFlag"
label=
"3"
:disabled=
"apear != 'couponAdd'"
>
关联商品可用
</el-radio>
<span
class=
"promptCopy"
>
关联商品,用户支付成功后才能进行核销使用
</span>
</div>
</
template
>
<
template
slot=
"directionalFlagHtml"
v-else
>
<div>
<el-radio
v-model=
"editForm.directionalFlag"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
所有客户可用
</el-radio>
<span
class=
"promptCopy"
>
创建成功后立即生效,所有小程序用户均可领用
</span>
</div>
<div>
<el-radio
v-model=
"editForm.directionalFlag"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
定向礼包专用
</el-radio>
<span
class=
"promptCopy"
>
企微员工通过企微工作台定向礼包发送给客户
</span>
</div>
</
template
>
<
template
slot=
"effectiveHtml"
>
<el-radio
v-model=
"editForm.effectiveType"
label=
"3"
:disabled=
"apear != 'couponAdd'"
>
无有效期
</el-radio>
<br
/>
...
...
@@ -375,17 +365,15 @@ export default {
'editForm.useChannel'
(
newValue
,
oldValue
)
{
let
goodHtmlIndex
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'goods'
)
let
proTableIndex
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
addHtml
==
'proTable'
)
this
.
editFormData
[
goodHtmlIndex
].
isHide
=
newValue
!=
1
this
.
editForm
.
directionalFlag
=
'1'
if
(
newValue
==
1
)
{
this
.
editForm
.
directionalFlag
=
'1'
this
.
editFormData
[
goodHtmlIndex
].
isHide
=
false
if
(
this
.
editForm
.
goodsRefList
.
length
)
{
this
.
editFormData
[
proTableIndex
].
isHide
=
false
}
}
else
{
this
.
editForm
.
directionalFlag
=
'1'
this
.
editForm
.
useBarriers
=
'1'
this
.
editForm
.
full
=
''
this
.
editFormData
[
goodHtmlIndex
].
isHide
=
true
this
.
editFormData
[
proTableIndex
].
isHide
=
true
}
},
...
...
@@ -441,7 +429,9 @@ export default {
haveChange
()
{
let
oDateOne
=
new
Date
(
this
.
editForm
.
effectiveTime
[
0
]).
getTime
()
let
timeStamp
=
new
Date
().
getTime
()
if
(
oDateOne
<
timeStamp
)
this
.
editForm
.
effectiveTime
=
[]
if
(
oDateOne
<
timeStamp
)
{
this
.
editForm
.
effectiveTime
=
[]
}
},
// 编辑按钮
editMessage
()
{
...
...
src/views/productGroup/editProduct.vue
View file @
f188356
...
...
@@ -11,11 +11,11 @@
<div
v-for=
"(item, index) in externalFormList"
:key=
"index"
>
<p
class=
"edit-title"
>
{{
item
.
title
}}
</p>
<glsx-combi-form
class=
"edit-form-container m-b-60"
ref=
"editFormRef"
:labelWidth=
"labelWidth"
:isEdit=
"isEdit"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"item.editChildRef"
:formObj=
"editForm"
:formData=
"item.editFormData"
:formRules=
"item.editRule"
@
handleImgDelete=
"handleFormImgDelete"
>
<template
slot=
"businessType"
slot-scope=
"scope"
>
<
!--
<
template
slot=
"businessType"
slot-scope=
"scope"
>
<el-checkbox-group
v-model=
"editForm.businessType"
>
<el-checkbox
:disabled=
"routeInfo.addOrEdit == 3"
v-for=
"value in scope.scope.businessTypeList"
:key=
"value.businessType"
:label=
"value.businessType"
>
{{
value
.
businessTypeName
}}
</el-checkbox>
</el-checkbox-group>
</
template
>
</
template
>
-->
<
template
slot=
"describeBtn"
>
<el-button
:disabled=
"isDisabled"
type=
"default"
@
click=
"handleDescribeImgAdd"
>
+添加图片
</el-button>
<span
class=
"edit-tips m-l-20"
>
最多可添加10张图片
</span>
...
...
@@ -69,9 +69,9 @@
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</span>
</glsx-combi-form>
<GLTable
ref=
"coupon"
:hasNum=
"false"
:getListApi=
"getListApi"
:searchForm=
"
associationTableSearchForm"
:tableParams=
"associationTableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"associationBeforeSearchFn
"
@
setTableFinishFun=
"setTableFinishFun"
>
<GLTable
ref=
"coupon"
:hasNum=
"false"
:getListApi=
"getListApi"
:searchForm=
"
searchForm"
:tableParams=
"associationTableParams"
:pageConf=
"pageConf
"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"association"
slot-scope=
"scope"
class=
"association"
>
<el-radio
:label=
"scope.scope.id"
v-model=
"
r
adio"
@
change
.
native=
"getCurrentRow()"
></el-radio>
<el-radio
:label=
"scope.scope.id"
v-model=
"
associationR
adio"
@
change
.
native=
"getCurrentRow()"
></el-radio>
</div>
</GLTable>
<!-- 表格区域 end -->
...
...
@@ -291,12 +291,10 @@ export default {
data
()
{
return
{
dialogTableVisible
:
false
,
r
adio
:
''
,
associationR
adio
:
''
,
templateSelection
:
[],
associationList
:
[],
relatedDiscountType
:
''
,
// associationUseChannel:'',
// associationShow: false,
// 关联优惠券表格
searchForm
:
{
couponName
:
''
,
...
...
@@ -304,7 +302,6 @@ export default {
status
:
2
,
discountTypes
:
[
2
,
3
,
4
]
},
associationTableSearchForm
:
{
status
:
2
,
directionalFlag
:
3
},
// 搜索
searchFormData
:
[
{
...
...
@@ -554,18 +551,15 @@ export default {
})
}
},
{
label
:
'业务类型'
,
name
:
'businessType'
,
addHtml
:
'businessType'
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
isDisabled
:
false
,
businessTypeList
:
[]
// handleRadioChange: val => {
// this.handleTypeChange(val)
// }
},
// {
// label: '业务类型',
// name: 'businessType',
// addHtml: 'businessType',
// optionId: 'confId',
// optionLabel: 'confName',
// isDisabled: false,
// businessTypeList: []
// },
{
label
:
'商品分类'
,
name
:
'classifyIdList'
,
...
...
@@ -826,23 +820,19 @@ export default {
this
.
externalFormList
[
2
].
editFormData
[
inx
].
optionList
.
map
(
val
=>
{
if
(
val
.
confId
==
2
)
return
(
val
.
isDisabled
=
false
)
})
this
.
editForm
.
deliveryType
=
2
//
this.editForm.deliveryType = 2
this
.
handleTypeChange
(
this
.
editForm
.
deliveryType
)
}
},
// 关联优惠券radio
'editForm.relatedCouponId'
(
newValue
,
oldValue
)
{
if
(
newValue
)
{
this
.
radio
=
newValue
}
else
{
this
.
radio
=
newValue
}
this
.
associationRadio
=
newValue
}
},
created
()
{
this
.
routeInfo
=
this
.
$route
.
query
this
.
businessGetBusinessTypeById
()
//
this.businessGetBusinessTypeById()
},
mounted
()
{
...
...
@@ -862,15 +852,15 @@ export default {
},
methods
:
{
businessGetBusinessTypeById
()
{
this
.
$apis
.
proManage
.
getBusinessTypeByIdApi
({}).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
var
idx
=
this
.
externalFormList
[
0
].
editFormData
.
findIndex
(
subItem
=>
subItem
.
name
==
'businessType'
)
this
.
externalFormList
[
0
].
editFormData
[
idx
].
businessTypeList
=
res
})
},
//业务类型请求
// businessGetBusinessTypeById() {
// this.$apis.proManage.getBusinessTypeByIdApi({}).then(res => {
// console.log('res', res)
// var idx = this.externalFormList[0].editFormData.findIndex(subItem => subItem.name == 'businessType')
// this.externalFormList[0].editFormData[idx].businessTypeList = res
// })
// },
del
()
{
this
.
associationShow
=
false
this
.
editForm
.
relatedCouponId
=
''
this
.
editForm
.
relatedCouponName
=
''
this
.
editForm
.
relatedDiscountType
=
''
...
...
@@ -878,21 +868,22 @@ export default {
},
associationConfirm
()
{
this
.
dialogTableVisible
=
false
this
.
associationShow
=
true
this
.
editForm
.
relatedUseChannel
=
''
this
.
editForm
.
relatedCouponId
=
this
.
associationList
[
0
].
id
this
.
editForm
.
relatedCouponName
=
this
.
associationList
[
0
].
couponName
this
.
editForm
.
relatedDiscountType
=
this
.
associationBaseData
.
discountTypeList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
discountType
).
confName
if
(
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
useChannel
))
this
.
editForm
.
relatedUseChannel
=
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
useChannel
).
confName
if
(
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
useChannel
))
{
this
.
editForm
.
relatedUseChannel
=
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
useChannel
).
confName
}
},
associationCancel
()
{
this
.
r
adio
=
this
.
editForm
.
relatedCouponId
this
.
associationR
adio
=
this
.
editForm
.
relatedCouponId
this
.
dialogTableVisible
=
false
},
getCurrentRow
()
{
//获取选中数据
// this.radio
let
inx
=
this
.
templateSelection
.
findIndex
(
value
=>
value
.
id
==
this
.
r
adio
)
let
inx
=
this
.
templateSelection
.
findIndex
(
value
=>
value
.
id
==
this
.
associationR
adio
)
this
.
associationList
.
pop
()
this
.
associationList
.
push
(
this
.
templateSelection
[
inx
])
},
...
...
@@ -1231,7 +1222,7 @@ export default {
// 获取商品信息
getInfo
()
{
this
.
$apis
.
proManage
.
getProInfoApi
({
id
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
//
console.log('res', res)
this
.
editForm
=
{
...
res
,
goodsVideo
:
res
.
goodsVideo
||
''
,
...
...
@@ -1250,7 +1241,9 @@ export default {
this
.
editForm
.
relatedCouponId
=
res
.
relatedCoupon
.
id
this
.
editForm
.
relatedCouponName
=
res
.
relatedCoupon
.
couponName
this
.
editForm
.
relatedDiscountType
=
this
.
associationBaseData
.
discountTypeList
.
find
(
item
=>
item
.
confId
==
res
.
relatedCoupon
.
discountType
).
confName
this
.
editForm
.
relatedUseChannel
=
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
res
.
relatedCoupon
.
useChannel
).
confName
if
(
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
res
.
relatedCoupon
.
useChannel
))
{
this
.
editForm
.
relatedUseChannel
=
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
res
.
relatedCoupon
.
useChannel
).
confName
}
}
// 是否需要安装
this
.
editForm
.
install
=
this
.
editForm
.
install
||
'Y'
...
...
@@ -1392,18 +1385,18 @@ export default {
params
.
id
=
this
.
routeInfo
.
id
}
// 业务类型
params
.
businessTypeList
=
params
.
businessType
if
(
!
params
.
businessTypeList
)
{
delete
params
.
businessTypeList
}
else
{
var
idx
=
this
.
externalFormList
[
0
].
editFormData
.
findIndex
(
subItem
=>
subItem
.
name
==
'businessType'
)
var
list
=
this
.
externalFormList
[
0
].
editFormData
[
idx
].
businessTypeList
params
.
businessTypeList
=
[]
this
.
editForm
.
businessType
.
forEach
(
item
=>
{
console
.
log
(
item
)
params
.
businessTypeList
.
push
(
list
.
find
(
k
=>
k
.
businessType
==
item
))
})
}
//
params.businessTypeList = params.businessType
//
if (!params.businessTypeList) {
//
delete params.businessTypeList
//
} else {
//
var idx = this.externalFormList[0].editFormData.findIndex(subItem => subItem.name == 'businessType')
//
var list = this.externalFormList[0].editFormData[idx].businessTypeList
//
params.businessTypeList = []
//
this.editForm.businessType.forEach(item => {
//
console.log(item)
//
params.businessTypeList.push(list.find(k => k.businessType == item))
//
})
//
}
// 描述
params
.
goodsDescList
=
[]
this
.
editForm
.
descImgList
.
forEach
(
item
=>
{
...
...
@@ -1492,14 +1485,6 @@ export default {
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
return
params
},
// 关联优惠券请求
associationBeforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
associationTableSearchForm
=
this
.
getParams
()
// delete this.tableSearchForm.createDate
resolve
()
})
},
setTableFinishFun
()
{
let
num
=
0
let
pageSize
=
Number
(
this
.
$refs
.
coupon
[
0
].
page
.
pageSize
)
...
...
@@ -1513,7 +1498,6 @@ export default {
// console.log('this.$refs.coupon',this.$refs.coupon[0])
//接收到的数据为空
this
.
templateSelection
=
this
.
$refs
.
coupon
[
0
].
data
// this.$refs.coupon[0].data.length ? (this.$refs.coupon[0].tableHeightValues = '') : this.$refs.coupon[0].setTableHeightFun()
},
handleSearch
()
{
this
.
$refs
.
coupon
[
0
].
refreshTable
()
...
...
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