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 0fc044c2
authored
Jul 22, 2022
by
wuwx
Committed by
chenwq
Jul 22, 2022
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改广汇配置门店
1 parent
0b8f5c78
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
35 deletions
src/views/giftBag/components/phone-area.vue
src/views/giftBag/editGift.vue
src/views/homeSet/index.vue
src/views/giftBag/components/phone-area.vue
View file @
0fc044c
...
...
@@ -57,9 +57,6 @@ export default {
this
.
formatPhone
()
},
formatPhone
()
{
this
.
$nextTick
(()
=>
{
setTimeout
(()
=>
{
console
.
log
(
'phones'
,
this
.
phones
);
let
phoneLists
=
this
.
phones
.
split
(
'\n'
)
phoneLists
=
[...
new
Set
(
phoneLists
)]
// let phoneLists = this.phones.split(/[\n|\s|,|,]/)
...
...
@@ -77,10 +74,7 @@ export default {
})
})
this
.
phoneLists
=
arr
.
filter
(
item
=>
item
.
tel
)
console
.
log
(
'phoneLists'
,
this
.
phoneLists
);
this
.
$emit
(
'changePhoneList'
,
this
.
phoneLists
)
},
100
)
})
},
}
}
...
...
src/views/giftBag/editGift.vue
View file @
0fc044c
...
...
@@ -47,7 +47,7 @@
</div>
<div
class=
"approval"
slot=
"approvalSlot"
>
<!--
<el-radio
:disabled=
"routeInfo.receivedStock"
v-model=
"editForm.approveFlag"
:label=
"1"
>
赠送前需审批
</el-radio>
-->
<el-radio
disabled
v-model=
"editForm.approveFlag"
:label=
"1"
>
赠送前需审批
</el-radio>
<el-radio
v-model=
"editForm.approveFlag"
:label=
"1"
>
赠送前需审批
</el-radio>
<p
class=
"approval-tip"
style=
"margin-bottom:12px;"
>
员工在赠送时需提交赠送申请,审批通过后才可赠送
</p>
<el-radio
:disabled=
"routeInfo.receivedStock"
v-model=
"editForm.approveFlag"
:label=
"2"
>
无需审批
</el-radio>
<p
class=
"approval-tip"
>
无需审批,可直接赠送给客户
</p>
...
...
@@ -79,10 +79,12 @@
</el-tag>
</div>
</div>
<div
class=
"approval"
slot=
"cardHolder"
>
<el-radio
:disabled=
"routeInfo.addOrEdit == 'edit'"
v-model=
"editForm.cardHolder"
:label=
"1"
>
否
</el-radio>
<el-radio
:disabled=
"routeInfo.addOrEdit == 'edit'"
v-model=
"editForm.cardHolder"
:label=
"2"
>
是
</el-radio>
<p
class=
"cardHolder-tip"
>
(根据手机号将礼包中的优惠券直接发放到小程序对应账户的卡包中)
</p>
<div
class=
"approval"
slot=
"grantType"
>
<el-radio
:disabled=
"routeInfo.addOrEdit == 'edit'"
v-model=
"editForm.grantType"
:label=
"1"
>
否
</el-radio>
<el-radio
:disabled=
"routeInfo.addOrEdit == 'edit'"
v-model=
"editForm.grantType"
:label=
"2"
>
是
</el-radio>
<p
class=
"grantType-tip"
>
(根据手机号将礼包中的优惠券直接发放到小程序对应账户的卡包中)
</p>
</div>
<div
class=
"approval"
slot=
"receiveDetails"
>
<phoneArea
:phones=
"phones"
:phoneLists=
"phoneLists"
ref=
"phoneArea"
placeholder=
"请输入领取手机号,多个手机号以换行隔开"
/>
</div>
</glsx-combi-form>
...
...
@@ -120,7 +122,6 @@ export default {
return
{
phones
:
''
,
phoneLists
:[],
arrs
:
'18952120000,18952120001,18952120002,18952120003,18952120004,18952120005,18952120006,18952120007,18952120008,18952120009,'
,
phone
:
''
,
arr
:[],
isLoaded
:
true
,
...
...
@@ -160,9 +161,9 @@ export default {
// 优惠券状态(status):1:未生效,2:生效中,3:已失效
couponList
:
[],
stock
:
1
,
approveFlag
:
2
,
approveFlag
:
1
,
receiveRule
:
1
,
cardHolder
:
1
,
grantType
:
1
,
},
totalEstimatedCost
:
''
,
orderShow
:
[
'service'
,
'cash'
,
'discount'
,
'exchange'
],
...
...
@@ -221,7 +222,16 @@ export default {
],
approveFlag
:
[{
required
:
true
,
message
:
'请选择审批要求'
,
trigger
:
'change'
}],
receiveRule
:
[{
required
:
true
,
message
:
'请选择领取规则设置'
,
trigger
:
'change'
}],
cardHolder
:
[{
required
:
true
,
message
:
''
,
trigger
:
'change'
}]
grantType
:
[{
required
:
true
,
message
:
''
,
trigger
:
'change'
}],
receiveDetails
:
[
{
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
return
this
.
$refs
.
phoneArea
.
phones
?
callback
()
:
callback
(
new
Error
(
'请输入用户手机号'
))
},
trigger
:
'change'
}
]
// receiveDetails: [
// { required: true, message: '请输入领取条件', trigger: 'change' },
// {
...
...
@@ -273,12 +283,9 @@ export default {
},
{
label
:
'发放到小程序卡包'
,
name
:
'
cardHolder
'
,
name
:
'
grantType
'
,
isDisabled
:
false
,
addHtml
:
'cardHolder'
,
// style: {
// 'margin-left': '10px'
// }
addHtml
:
'grantType'
},
{
label
:
'库存数量'
,
...
...
@@ -307,7 +314,6 @@ export default {
{
confId
:
2
,
confName
:
'员工赠送时指定'
,
isDisabled
:
true
},
{
confId
:
3
,
...
...
@@ -362,6 +368,12 @@ export default {
addHtml
:
'staffListBlock'
},
{
label
:
'用户手机号'
,
name
:
'receiveDetails'
,
addHtml
:
'receiveDetails'
,
isHide
:
true
},
{
label
:
'赠送原因'
,
name
:
'giveReason'
,
type
:
'input'
,
...
...
@@ -404,14 +416,15 @@ export default {
this
.
isChangePeople
=
this
.
judgeAddOrDel
(
val
,
this
.
currentPeople
,
'staffUUID'
)
}
},
'editForm.cardHolder'
(
newValue
)
{
console
.
log
(
'newValue'
,
newValue
);
'editForm.grantType'
(
newValue
)
{
let
idx
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'staffList'
)
let
idxx
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'approveFlag'
)
let
idxxx
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'receiveRule'
)
let
idxxxx
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'receiveDetails'
)
this
.
editFormData
[
idx
].
isHide
=
newValue
==
2
this
.
editFormData
[
idxx
].
isHide
=
newValue
==
2
this
.
editFormData
[
idxxx
].
isHide
=
newValue
==
2
this
.
editFormData
[
idxxxx
].
isHide
=
newValue
==
1
},
},
computed
:
{
...
...
@@ -490,15 +503,17 @@ export default {
this
.
approvalStatus
=
res
.
data
.
approveStatus
-
1
this
.
editForm
=
res
.
data
this
.
curStock
=
res
.
data
.
stock
this
.
editForm
.
grantType
=
res
.
data
.
grantType
||
1
this
.
receiveWay
=
res
.
data
.
receiveWay
||
1
if
(
res
.
data
&&
res
.
data
.
receiveDetails
)
{
if
(
res
.
data
&&
res
.
data
.
receiveDetails
&&
res
.
data
.
grantType
==
1
)
{
this
.
phone
=
res
.
data
.
receiveDetails
.
replaceAll
(
','
,
'\n'
)
this
.
formatPhone
()
}
if
(
this
.
arrs
)
{
this
.
editForm
.
cardHolder
=
1
this
.
phones
=
this
.
arrs
.
replaceAll
(
','
,
'\n'
)
if
(
res
.
data
.
receiveDetails
&&
res
.
data
.
grantType
==
2
)
{
this
.
phones
=
res
.
data
.
receiveDetails
.
replaceAll
(
','
,
'\n'
)
setTimeout
(()
=>
{
this
.
$refs
.
phoneArea
.
formatPhone
()
},
50
)
}
this
.
recoveryCoupon
()
this
.
recoveryTotalPrice
()
...
...
@@ -635,15 +650,16 @@ export default {
},
handleConfirm
()
{
if
(
this
.
arrs
)
{
setTimeout
(()
=>
{
console
.
log
(
'phoneLists'
,
this
.
$refs
.
phoneArea
.
phoneLists
);
},
100
)
}
let
validItem
=
this
.
phoneList
.
find
(
item
=>
!
item
.
valid
)
if
(
validItem
&&
validItem
.
tel
)
{
return
this
.
$message
.
error
(
`
${
this
.
receiveWay
==
1
?
'手机号'
:
'车架号'
}${
validItem
.
tel
}
格式错误,请修改!`
)
}
if
(
this
.
editForm
.
grantType
==
2
){
let
validItems
=
this
.
$refs
.
phoneArea
.
phoneLists
.
find
(
item
=>
!
item
.
valid
)
if
(
validItems
&&
validItems
.
tel
)
{
return
this
.
$message
.
error
(
`手机号格式错误,请修改!`
)
}
}
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
...
...
@@ -652,7 +668,7 @@ export default {
params
.
couponCreateRequests
.
forEach
(
item
=>
{
item
.
couponId
=
item
.
id
})
if
(
this
.
editForm
.
receiveRule
==
1
)
{
if
(
this
.
editForm
.
receiveRule
==
1
&&
this
.
editForm
.
grantType
==
1
)
{
params
.
receiveDetailList
=
this
.
phoneList
.
map
(
item
=>
item
.
tel
)
let
maxLength
=
500
if
(
params
.
receiveDetailList
&&
params
.
receiveDetailList
.
length
>
maxLength
){
...
...
@@ -664,12 +680,17 @@ export default {
delete
params
.
couponList
if
(
this
.
routeInfo
.
addOrEdit
==
'edit'
)
{
params
.
id
=
this
.
routeInfo
.
id
if
(
this
.
editForm
.
receiveRule
==
2
)
{
if
(
this
.
editForm
.
receiveRule
==
2
&&
this
.
editForm
.
grantType
==
1
)
{
let
telArr
=
[]
this
.
editForm
.
receiveDetails
&&
(
telArr
=
this
.
editForm
.
receiveDetails
.
split
(
','
))
params
.
receiveDetailList
=
[...
telArr
]
}
}
if
(
this
.
editForm
.
grantType
==
2
)
{
let
phoneLists
=
this
.
$refs
.
phoneArea
.
phoneLists
params
.
receiveDetailList
=
phoneLists
.
map
(
item
=>
item
.
tel
)
params
.
receiveWay
=
this
.
receiveWay
}
params
.
requestSource
=
1
// 插入判断是否存在审批模板
// const { session } = this.$globalState
...
...
@@ -978,7 +999,7 @@ export default {
}
}
}
.
cardHolder
-tip
{
.
grantType
-tip
{
display
:
inline
;
font-size
:
12px
;
color
:
#999
;
...
...
src/views/homeSet/index.vue
View file @
0fc044c
This diff is collapsed.
Click to expand it.
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