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 a1f5f986
authored
Jun 22, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'zq_dev_v2.5.0' into 'v2.5.0'
0704定向礼包 提测合并 See merge request
!201
2 parents
5b35a5c0
ff82c491
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
371 additions
and
108 deletions
src/api/modules/giftBag.js
src/assets/css/public.scss
src/setup/qiankun.js
src/views/giftBag/editGift.vue
src/views/giftBag/giftDetail.vue
src/views/giftBag/giftList.vue
src/views/giftBag/receivedGiftList.vue
src/api/modules/giftBag.js
View file @
a1f5f98
...
@@ -119,4 +119,14 @@ const templateModal = params => {
...
@@ -119,4 +119,14 @@ const templateModal = params => {
})
})
}
}
export
default
{
getFollowerStaffListApi
,
getListApi
,
giftExportApi
,
deleteGiftApi
,
getGiftInfoApi
,
getReceivedGiftInfoApi
,
exportGiftInfoApi
,
getDirectionalGiftListApi
,
insertGiftApi
,
templateModal
,
getghDirectionalGiftListApi
}
const
toVoidGift
=
params
=>
{
params
.
method
=
'scrm.api.coupon.user.directional.gift.cancel'
return
http
({
url
:
'rop-scrm-coupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getFollowerStaffListApi
,
getListApi
,
giftExportApi
,
deleteGiftApi
,
getGiftInfoApi
,
getReceivedGiftInfoApi
,
exportGiftInfoApi
,
getDirectionalGiftListApi
,
insertGiftApi
,
templateModal
,
getghDirectionalGiftListApi
,
toVoidGift
}
src/assets/css/public.scss
View file @
a1f5f98
...
@@ -580,3 +580,6 @@ html {
...
@@ -580,3 +580,6 @@ html {
border-top-color
:
#e4e7ed
!
important
;
border-top-color
:
#e4e7ed
!
important
;
}
}
/* tab */
/* tab */
.myMessage
{
z-index
:
4000
!
important
;
}
src/setup/qiankun.js
View file @
a1f5f98
...
@@ -38,6 +38,12 @@ export async function bootstrap({ history, common, messenger, globalState, route
...
@@ -38,6 +38,12 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue
.
prototype
.
$http_merchant
=
new
common
.
Http
({
response
,
request
:
request_merchant
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_merchant
=
new
common
.
Http
({
response
,
request
:
request_merchant
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
'md5'
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
'md5'
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_xiaolong
=
new
common
.
Http
({
response
,
request
:
xiaolong_req
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_xiaolong
=
new
common
.
Http
({
response
,
request
:
xiaolong_req
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
// const myToken = 'scrm-base-107ee03c-1214-48c3-a443-a2332e553b2f-rop'
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: myToken } })
// Vue.prototype.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
...
...
src/views/giftBag/editGift.vue
View file @
a1f5f98
...
@@ -29,41 +29,43 @@
...
@@ -29,41 +29,43 @@
<div
v-for=
"(item, index) in orderShow"
:key=
"index"
>
<div
v-for=
"(item, index) in orderShow"
:key=
"index"
>
<div
class=
"gift-box"
v-show=
"couponObj[item].list.length"
>
<div
class=
"gift-box"
v-show=
"couponObj[item].list.length"
>
<!--
<div
class=
"gift-label"
>
{{
couponObj
[
item
].
label
}}
:
</div>
-->
<!--
<div
class=
"gift-label"
>
{{
couponObj
[
item
].
label
}}
:
</div>
-->
<img
style=
"margin: 4px 12px 0 0;height:22px;width:58px;
"
:src=
"require(`@/assets/coupon/icon-$
{item}.png`)" />
<img
class=
"server-type
"
:src=
"require(`@/assets/coupon/icon-$
{item}.png`)" />
<div
class=
"gift-content"
>
<div
class=
"gift-content"
>
<div
class=
"gift-item"
v-for=
"(subItem, subIndex) in couponObj[item].list"
:key=
"subIndex"
>
<div
class=
"gift-item"
v-for=
"(subItem, subIndex) in couponObj[item].list"
:key=
"subIndex"
>
<span
:class=
"['circle', subItem.status == '3' ? ' grey' : '']"
></span>
<span
:class=
"['circle', subItem.status == '3' ? ' grey' : '']"
></span>
<p
:class=
"['gift-coupon-name', subItem.status == '3' ? ' txt-grey' : '']"
>
{{
subItem
.
couponName
}}
×
{{
subItem
.
couponAmount
}}
</p>
<p
:class=
"['gift-coupon-name', subItem.status == '3' ? ' txt-grey' : '']"
>
{{
subItem
.
couponName
}}
×
{{
subItem
.
couponAmount
}}
</p>
<p
v-show=
"subItem.status == '3'"
class=
"gift-tips"
>
已失效
</p>
<p
v-show=
"subItem.status == '3'"
class=
"gift-tips"
>
已失效
</p>
<i
class=
"el-icon-delete"
@
click=
"handleGiftDelete(item, subIndex)"
></i>
<i
class=
"el-icon-delete"
style=
"color: #C6C6C6;"
@
click=
"handleGiftDelete(item, subIndex)"
></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"stock"
slot=
"stockNumInput"
>
<div
class=
"stock"
slot=
"stockNumInput"
>
<el-input
@
input=
"
setStockNum"
:min=
"1"
:max=
"5"
v-model
.
number=
"editForm.stockNum
"
></el-input>
<el-input
@
input=
"
resetStock"
v-model=
"editForm.stock
"
></el-input>
<span
class=
"approval-tip"
style=
"margin-left:8px;"
>
每个用户根据领取规则限领一次礼包
</span>
<span
class=
"approval-tip"
style=
"margin-left:8px;"
>
每个用户根据领取规则限领一次礼包
</span>
</div>
</div>
<div
class=
"approval"
slot=
"approvalSlot"
>
<div
class=
"approval"
slot=
"approvalSlot"
>
<el-radio
v-model=
"editForm.approv
alRequire"
label=
"1"
>
赠送前需审批
</el-radio>
<el-radio
v-model=
"editForm.approv
eFlag"
:
label=
"1"
>
赠送前需审批
</el-radio>
<p
class=
"approval-tip"
style=
"margin-bottom:12px;"
>
员工在赠送
钱
需提交赠送申请,审批通过后才可赠送
</p>
<p
class=
"approval-tip"
style=
"margin-bottom:12px;"
>
员工在赠送
时
需提交赠送申请,审批通过后才可赠送
</p>
<el-radio
v-model=
"editForm.approv
alRequire"
label=
"2"
>
无需审批
</el-radio>
<el-radio
v-model=
"editForm.approv
eFlag"
:
label=
"2"
>
无需审批
</el-radio>
<p
class=
"approval-tip"
>
无需审批,可直接赠送给客户
</p>
<p
class=
"approval-tip"
>
无需审批,可直接赠送给客户
</p>
</div>
</div>
<div
class=
"telArea"
slot=
"configSlot"
>
<div
v-if=
"editForm.receiveRule === 1"
class=
"telArea"
slot=
"configSlot"
>
<label
class=
"receiving"
for=
""
>
领取条件:
</label>
<label
class=
"receiving"
for=
""
>
领取条件:
</label>
<el-radio-group
v-model=
"receiveWay"
>
<el-radio-group
:disabled=
"routeInfo.id && routeInfo.receivedStock"
@
change=
"resetTextArea"
v-model=
"receiveWay"
>
<el-radio
label=
"1"
>
指定手机号
</el-radio>
<el-radio
:
label=
"1"
>
指定手机号
</el-radio>
<el-radio
label=
"2"
>
指定车架号后6位
</el-radio>
<el-radio
:
label=
"2"
>
指定车架号后6位
</el-radio>
</el-radio-group>
</el-radio-group>
<el-input
@
blur=
"formatPhone"
style=
"margin-left:70px;width: calc(100% - 70px);"
type=
"textarea"
v-model=
"phone"
placeholder=
"请输入领取手机号,多个手机号以空格隔开"
></el-input>
<div
style=
"margin-left:70px;width: calc(100% - 70px);"
>
<span
class=
"approval-tip"
style=
"margin-left:70px;"
>
客户需准确输入该手机号码才能成功领取
</span>
<el-input
:disabled=
"routeInfo.id && routeInfo.receivedStock"
@
blur=
"formatPhone"
type=
"textarea"
v-model=
"phone"
:placeholder=
"placeholder"
></el-input>
<span
class=
"approval-tip"
style=
"margin-left:0;"
>
客户需准确输入该
{{
receiveWay
==
1
?
'手机号码'
:
'车架号后6位'
}}
才能成功领取
</span>
<div>
<div>
<span
v-for=
"(item, index) in phoneList"
:key=
"index"
:style=
"
{ color: !item.valid ? 'red' : '#333', 'margin-left': '10px' }
">
<div
:class=
"['tel-item', item.valid ? '' : 'valid-tel']"
v-for=
"(item, index) in phoneList"
:key=
"index
"
>
{{
item
.
tel
}}
{{
item
.
tel
}}
<i
style=
"cursor: pointer;"
class=
"el-icon-close"
@
click=
"delPhone(item.tel)"
></i>
<i
:style=
"
{ cursor: routeInfo.id
&&
routeInfo.receivedStock ? 'not-allowed' : 'pointer' }" class="el-icon-close" @click="delPhone(item.tel)">
</i>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!--
<div
slot=
"receiveDetails"
class=
"edit-tips m-t-8"
>
客户需要输入该
{{
editForm
.
receiveWay
==
'1'
?
'手机号'
:
'车架号后6位'
}}
才能成功领取
</div>
-->
<!--
<div
slot=
"receiveDetails"
class=
"edit-tips m-t-8"
>
客户需要输入该
{{
editForm
.
receiveWay
==
'1'
?
'手机号'
:
'车架号后6位'
}}
才能成功领取
</div>
-->
...
@@ -133,18 +135,18 @@ export default {
...
@@ -133,18 +135,18 @@ export default {
},
},
editStatus
:
false
,
editStatus
:
false
,
labelWidth
:
'144px'
,
labelWidth
:
'144px'
,
receiveWay
:
'1'
,
receiveWay
:
1
,
editForm
:
{
editForm
:
{
name
:
''
,
name
:
''
,
remarkName
:
''
,
remarkName
:
''
,
receiveWay
:
'1'
,
//
receiveWay: '1',
staffList
:
[],
staffList
:
[],
// 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务
// 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务
// 优惠券状态(status):1:未生效,2:生效中,3:已失效
// 优惠券状态(status):1:未生效,2:生效中,3:已失效
couponList
:
[],
couponList
:
[],
stock
Num
:
1
,
stock
:
1
,
approv
alRequire
:
'1'
,
approv
eFlag
:
1
,
receive
Config
:
'1'
receive
Rule
:
1
},
},
totalEstimatedCost
:
''
,
totalEstimatedCost
:
''
,
orderShow
:
[
'service'
,
'cash'
,
'discount'
,
'exchange'
],
orderShow
:
[
'service'
,
'cash'
,
'discount'
,
'exchange'
],
...
@@ -186,9 +188,9 @@ export default {
...
@@ -186,9 +188,9 @@ export default {
// receiveWay: [{ required: true, message: '请选择领取条件', trigger: 'change' }],
// receiveWay: [{ required: true, message: '请选择领取条件', trigger: 'change' }],
staffList
:
[{
required
:
true
,
message
:
'请选择发放员工'
,
trigger
:
'change'
}],
staffList
:
[{
required
:
true
,
message
:
'请选择发放员工'
,
trigger
:
'change'
}],
couponList
:
[{
required
:
true
,
message
:
'请选择礼包'
,
trigger
:
'change'
}],
couponList
:
[{
required
:
true
,
message
:
'请选择礼包'
,
trigger
:
'change'
}],
stock
Num
:
[{
required
:
true
,
message
:
'请输入库存数量'
,
trigger
:
'change'
}],
stock
:
[{
required
:
true
,
message
:
'请输入库存数量'
,
trigger
:
'change'
}],
approv
alRequire
:
[{
required
:
true
,
message
:
'请选择审批要求'
,
trigger
:
'change'
}],
approv
eFlag
:
[{
required
:
true
,
message
:
'请选择审批要求'
,
trigger
:
'change'
}],
receive
Config
:
[{
required
:
true
,
message
:
'请选择领取规则设置'
,
trigger
:
'change'
}]
receive
Rule
:
[{
required
:
true
,
message
:
'请选择领取规则设置'
,
trigger
:
'change'
}]
// receiveDetails: [
// receiveDetails: [
// { required: true, message: '请输入领取条件', trigger: 'change' },
// { required: true, message: '请输入领取条件', trigger: 'change' },
// {
// {
...
@@ -238,35 +240,39 @@ export default {
...
@@ -238,35 +240,39 @@ export default {
},
},
{
{
label
:
'库存数量'
,
label
:
'库存数量'
,
name
:
'stock
Num
'
,
name
:
'stock'
,
addHtml
:
'stockNumInput'
addHtml
:
'stockNumInput'
},
},
{
{
label
:
'审批要求'
,
label
:
'审批要求'
,
name
:
'approv
alRequire
'
,
name
:
'approv
eFlag
'
,
addHtml
:
'approvalSlot'
addHtml
:
'approvalSlot'
},
},
{
{
label
:
'领取规则设置'
,
label
:
'领取规则设置'
,
name
:
'receive
Config
'
,
name
:
'receive
Rule
'
,
type
:
'radio'
,
type
:
'radio'
,
optionId
:
'confId'
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionLabel
:
'confName'
,
isDisabled
:
false
,
optionList
:
[
optionList
:
[
{
{
confId
:
'1'
,
confId
:
1
,
confName
:
'创建时指定'
confName
:
'创建时指定'
},
},
{
{
confId
:
'2'
,
confId
:
2
,
confName
:
'员工赠送时指定'
confName
:
'员工赠送时指定'
},
},
{
{
confId
:
'3'
,
confId
:
3
,
confName
:
'直接领取'
confName
:
'直接领取'
}
}
],
],
suffixSlot
:
'configSlot'
suffixSlot
:
'configSlot'
,
handleRadioChange
:
()
=>
{
this
.
resetTextArea
()
}
},
},
// {
// {
// label: '领取条件',
// label: '领取条件',
...
@@ -329,7 +335,6 @@ export default {
...
@@ -329,7 +335,6 @@ export default {
currentPeople
:
[]
currentPeople
:
[]
}
}
},
},
components
:
{
components
:
{
selectStaffDialog
,
selectStaffDialog
,
selectGiftDialog
selectGiftDialog
...
@@ -353,7 +358,11 @@ export default {
...
@@ -353,7 +358,11 @@ export default {
}
}
}
}
},
},
computed
()
{},
computed
:
{
placeholder
()
{
return
`请输入领取
${
this
.
receiveWay
==
1
?
'手机号'
:
'车架号后6位'
}
,多个
${
this
.
receiveWay
==
1
?
'手机号'
:
'车架号'
}
以换行符隔开`
}
},
mounted
()
{
mounted
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
...
@@ -361,34 +370,42 @@ export default {
...
@@ -361,34 +370,42 @@ export default {
this
.
routeInfo
=
this
.
$route
.
query
this
.
routeInfo
=
this
.
$route
.
query
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
this
.
routeInfo
.
addOrEdit
==
'add'
?
''
:
this
.
getInfo
()
this
.
routeInfo
.
addOrEdit
==
'add'
?
''
:
this
.
getInfo
()
if
(
this
.
routeInfo
.
id
&&
this
.
routeInfo
.
receivedStock
)
{
let
targetItem
=
this
.
editFormData
.
find
(
item
=>
item
.
name
==
'receiveRule'
)
targetItem
&&
(
targetItem
.
isDisabled
=
true
)
}
},
},
methods
:
{
methods
:
{
setStockNum
(
e
)
{
resetTextArea
()
{
if
(
+
e
<
1
)
{
this
.
phone
=
''
this
.
editForm
.
stockNum
=
1
this
.
phoneList
=
[]
}
},
if
(
+
e
>
15
)
{
resetStock
(
e
)
{
this
.
editForm
.
stockNum
=
15
this
.
editForm
.
stock
=
e
.
replace
(
/^
(
0+
)
|
[^\d]
+/g
,
''
)
}
},
},
delPhone
(
val
)
{
delPhone
(
val
)
{
if
(
this
.
phone
.
indexOf
(
'\n'
+
val
)
>
-
1
)
{
if
(
this
.
routeInfo
.
id
&&
this
.
routeInfo
.
receivedStock
)
return
this
.
phone
=
this
.
phone
.
replace
(
'\n'
+
val
,
''
)
let
phone
=
this
.
phone
.
replace
(
new
RegExp
(
'[\n]*'
+
val
+
'[\n]*'
,
'g'
),
'\n'
)
}
else
if
(
this
.
phone
.
indexOf
(
val
)
>
-
1
)
{
phone
=
phone
.
replace
(
/^
[\n]
+/
,
''
)
this
.
phone
=
this
.
phone
.
replace
(
val
+
'\n'
,
''
)
this
.
phone
=
phone
}
this
.
formatPhone
()
this
.
formatPhone
()
},
},
formatPhone
()
{
formatPhone
()
{
console
.
log
(
this
.
orderShow
)
let
phoneList
=
this
.
phone
.
split
(
'\n'
)
let
phoneList
=
this
.
phone
.
split
(
'\n'
)
const
phoneReg
=
/^
(
13
[
0-9
]
|15
[
0-9
]
|16
[
0-9
]
|17
[
0-9
]
|18
[
0-9
]
|19
[
0-9
]
|14
[
0-9
])[
0-9
]{8}
$/
phoneList
=
[...
new
Set
(
phoneList
)]
// let phoneList = this.phone.split(/[\n|\s|,|,]/)
let
reg
if
(
this
.
receiveWay
==
1
)
{
reg
=
/^
(
13
[
0-9
]
|15
[
0-9
]
|16
[
0-9
]
|17
[
0-9
]
|18
[
0-9
]
|19
[
0-9
]
|14
[
0-9
])[
0-9
]{8}
$/
}
else
{
reg
=
/^
[
0-9a-zA-Z
]{6}
$/
}
let
arr
=
[]
let
arr
=
[]
phoneList
.
forEach
(
item
=>
{
phoneList
.
forEach
(
item
=>
{
arr
.
push
({
arr
.
push
({
tel
:
item
,
tel
:
item
,
valid
:
phoneR
eg
.
test
(
item
)
valid
:
r
eg
.
test
(
item
)
})
})
})
})
this
.
phoneList
=
arr
.
filter
(
item
=>
item
.
tel
)
this
.
phoneList
=
arr
.
filter
(
item
=>
item
.
tel
)
...
@@ -405,7 +422,11 @@ export default {
...
@@ -405,7 +422,11 @@ export default {
res
.
data
.
updatedDate
=
dayjs
(
res
.
data
.
updatedDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
res
.
data
.
updatedDate
=
dayjs
(
res
.
data
.
updatedDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
this
.
approvalStatus
=
res
.
data
.
approveStatus
-
1
this
.
approvalStatus
=
res
.
data
.
approveStatus
-
1
this
.
editForm
=
res
.
data
this
.
editForm
=
res
.
data
this
.
editForm
.
receiveWay
=
this
.
editForm
.
receiveWay
+
''
this
.
receiveWay
=
res
.
data
.
receiveWay
||
1
if
(
res
.
data
&&
res
.
data
.
receiveDetails
)
{
this
.
phone
=
res
.
data
.
receiveDetails
.
replaceAll
(
','
,
'\n'
)
this
.
formatPhone
()
}
this
.
recoveryCoupon
()
this
.
recoveryCoupon
()
this
.
recoveryTotalPrice
()
this
.
recoveryTotalPrice
()
this
.
hasStaffBlock
(
false
)
this
.
hasStaffBlock
(
false
)
...
@@ -540,6 +561,10 @@ export default {
...
@@ -540,6 +561,10 @@ export default {
},
},
handleConfirm
()
{
handleConfirm
()
{
let
validItem
=
this
.
phoneList
.
find
(
item
=>
!
item
.
valid
)
if
(
validItem
&&
validItem
.
tel
)
{
return
this
.
$message
.
error
(
`
${
this
.
receiveWay
==
1
?
'手机号'
:
'车架号'
}${
validItem
.
tel
}
格式错误,请修改!`
)
}
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
...
@@ -548,30 +573,40 @@ export default {
...
@@ -548,30 +573,40 @@ export default {
params
.
couponCreateRequests
.
forEach
(
item
=>
{
params
.
couponCreateRequests
.
forEach
(
item
=>
{
item
.
couponId
=
item
.
id
item
.
couponId
=
item
.
id
})
})
if
(
this
.
editForm
.
receiveRule
==
1
)
{
params
.
receiveDetailList
=
this
.
phoneList
.
map
(
item
=>
item
.
tel
)
params
.
receiveWay
=
this
.
receiveWay
}
delete
params
.
staffList
delete
params
.
staffList
delete
params
.
couponList
delete
params
.
couponList
if
(
this
.
routeInfo
.
addOrEdit
==
'edit'
)
{
if
(
this
.
routeInfo
.
addOrEdit
==
'edit'
)
{
params
.
id
=
this
.
routeInfo
.
id
params
.
id
=
this
.
routeInfo
.
id
if
(
this
.
editForm
.
receiveRule
==
2
)
{
let
telArr
=
[]
this
.
editForm
.
receiveDetails
&&
(
telArr
=
this
.
editForm
.
receiveDetails
.
split
(
','
))
params
.
receiveDetailList
=
[...
telArr
]
}
}
}
params
.
requestSource
=
1
params
.
requestSource
=
1
// 插入判断是否存在审批模板
// 插入判断是否存在审批模板
const
{
session
}
=
this
.
$globalState
// const { session } = this.$globalState
this
.
$apis
.
giftBag
.
templateModal
({
merchantId
:
session
.
merchantId
}).
then
(
result
=>
{
if
(
result
.
data
&&
(
!
this
.
isChangeCoupons
||
!
this
.
isChangePeople
))
{
this
.
$confirm
(
`<div>提交后立即生效,如需审批,请在企微工作台创建</div><div>是否继续提交</div>`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
dangerouslyUseHTMLString
:
true
})
.
then
(()
=>
{
this
.
insertHttp
(
params
)
})
.
catch
(()
=>
{})
}
else
{
this
.
insertHttp
(
params
)
this
.
insertHttp
(
params
)
}
// this.$apis.giftBag.templateModal({ merchantId: session.merchantId }).then(result => {
})
// if (result.data && (!this.isChangeCoupons || !this.isChangePeople)) {
// this.$confirm(`<div>提交后立即生效,如需审批,请在企微工作台创建</div><div>是否继续提交</div>`, '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning',
// dangerouslyUseHTMLString: true
// })
// .then(() => {
// this.insertHttp(params)
// })
// .catch(() => {})
// } else {
// this.insertHttp(params)
// }
// })
}
}
})
})
},
},
...
@@ -674,6 +709,23 @@ export default {
...
@@ -674,6 +709,23 @@ export default {
height
:
73px
;
height
:
73px
;
font-family
:
auto
;
font-family
:
auto
;
}
}
.tel-item
{
height
:
26px
;
display
:
inline-block
;
padding
:
0
8px
;
line-height
:
26px
;
background
:
#fafbfe
;
border-radius
:
4px
;
border
:
1px
solid
#e8e8ea
;
color
:
#666666
;
text-align
:
center
;
margin-right
:
4px
;
}
.valid-tel
{
background
:
#fff1f0
;
border
:
1px
solid
#ffa39e
;
color
:
#ff4d4f
;
}
}
}
//
礼包
//
礼包
.gift-block
{
.gift-block
{
...
@@ -691,6 +743,11 @@ export default {
...
@@ -691,6 +743,11 @@ export default {
.gift-box
{
.gift-box
{
display
:
flex
;
display
:
flex
;
padding
:
10px
0
10px
10px
;
padding
:
10px
0
10px
10px
;
.server-type
{
margin
:
4px
12px
0
0
;
height
:
23px
;
width
:
58px
;
}
.gift-label
{
.gift-label
{
width
:
70px
;
width
:
70px
;
color
:
#999999
;
color
:
#999999
;
...
...
src/views/giftBag/giftDetail.vue
View file @
a1f5f98
...
@@ -26,7 +26,8 @@
...
@@ -26,7 +26,8 @@
</div>
</div>
<div
v-for=
"(item, index) in orderShow"
:key=
"index"
>
<div
v-for=
"(item, index) in orderShow"
:key=
"index"
>
<div
class=
"gift-box"
v-show=
"couponObj[item].list.length"
>
<div
class=
"gift-box"
v-show=
"couponObj[item].list.length"
>
<div
class=
"gift-label"
>
{{
couponObj
[
item
].
label
}}
:
</div>
<!--
<div
class=
"gift-label"
>
{{
couponObj
[
item
].
label
}}
:
</div>
-->
<img
class=
"server-type"
:src=
"require(`@/assets/coupon/icon-$
{item}.png`)" />
<div
class=
"gift-content"
>
<div
class=
"gift-content"
>
<div
class=
"gift-item"
v-for=
"(subItem, subIndex) in couponObj[item].list"
:key=
"subIndex"
>
<div
class=
"gift-item"
v-for=
"(subItem, subIndex) in couponObj[item].list"
:key=
"subIndex"
>
<span
:class=
"['circle', subItem.status == '3' ? ' grey' : '']"
></span>
<span
:class=
"['circle', subItem.status == '3' ? ' grey' : '']"
></span>
...
@@ -37,7 +38,12 @@
...
@@ -37,7 +38,12 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
slot=
"receiveDetails"
>
{{
editForm
.
receiveWay
==
'1'
?
'指定手机号'
:
'指定车架号后6位'
}}
:
{{
editForm
.
receiveDetails
}}
</div>
<div
slot=
"receiveDetails"
>
<span
style=
"border: 1px dashed #333;"
>
{{
editForm
.
receiveWay
==
'1'
?
'指定手机号'
:
'指定车架号后6位'
}}
:
</span>
<div
class=
"phone-wrap"
>
<span
class=
"phone"
v-for=
"(item,id) in receiveDetailList"
:key=
"id"
>
{{
item
}}
</span>
</div>
</div>
<div
slot=
"staffListBlock"
class=
"sale-select"
v-show=
"editForm.staffList && editForm.staffList.length != 0"
>
<div
slot=
"staffListBlock"
class=
"sale-select"
v-show=
"editForm.staffList && editForm.staffList.length != 0"
>
<div
:key=
"key"
class=
"el-input-tag input-tag-wrapper-detail"
>
<div
:key=
"key"
class=
"el-input-tag input-tag-wrapper-detail"
>
<el-tag
effect=
"plain"
type=
"info"
v-for=
"(tag, idx) in editForm.staffList"
:key=
"idx"
:disable-transitions=
"false"
@
close=
"handleStaffRemove(tag, idx)"
>
<el-tag
effect=
"plain"
type=
"info"
v-for=
"(tag, idx) in editForm.staffList"
:key=
"idx"
:disable-transitions=
"false"
@
close=
"handleStaffRemove(tag, idx)"
>
...
@@ -80,6 +86,7 @@ export default {
...
@@ -80,6 +86,7 @@ export default {
footerWidth
:
'0'
,
footerWidth
:
'0'
,
loading
:
false
,
loading
:
false
,
editChildRef
:
'editChildRef'
,
editChildRef
:
'editChildRef'
,
receiveDetailList
:[],
routeInfo
:
{
routeInfo
:
{
// add-新增;edit-编辑;detail-详情
// add-新增;edit-编辑;detail-详情
addOrEdit
:
'add'
,
addOrEdit
:
'add'
,
...
@@ -194,6 +201,9 @@ export default {
...
@@ -194,6 +201,9 @@ export default {
res
.
data
.
createdDate
=
dayjs
(
res
.
data
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
res
.
data
.
createdDate
=
dayjs
(
res
.
data
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
res
.
data
.
updatedDate
=
dayjs
(
res
.
data
.
updatedDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
res
.
data
.
updatedDate
=
dayjs
(
res
.
data
.
updatedDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
this
.
editForm
=
res
.
data
this
.
editForm
=
res
.
data
let
arr
=
[]
res
.
data
.
receiveDetails
&&
(
arr
=
res
.
data
.
receiveDetails
.
split
(
','
))
this
.
receiveDetailList
=
[...
arr
]
this
.
approvalStatus
=
res
.
data
.
approveStatus
-
1
this
.
approvalStatus
=
res
.
data
.
approveStatus
-
1
this
.
recoveryCoupon
()
this
.
recoveryCoupon
()
this
.
recoveryTotalPrice
()
this
.
recoveryTotalPrice
()
...
@@ -268,6 +278,11 @@ export default {
...
@@ -268,6 +278,11 @@ export default {
.gift-box
{
.gift-box
{
display
:
flex
;
display
:
flex
;
padding
:
10px
0
10px
10px
;
padding
:
10px
0
10px
10px
;
.server-type
{
margin
:
4px
12px
0
0
;
height
:
23px
;
width
:
58px
;
}
.gift-label
{
.gift-label
{
width
:
70px
;
width
:
70px
;
color
:
#999999
;
color
:
#999999
;
...
@@ -299,6 +314,20 @@ export default {
...
@@ -299,6 +314,20 @@ export default {
}
}
}
}
}
}
.phone-wrap
{
width
:
878px
;
background-color
:
#F9F9F9
;
padding
:
5px
10px
;
line-height
:
14px
;
font-size
:
14px
;
box-sizing
:
border-box
;
margin-top
:
5px
;
.phone{
display
:
inline-block
;
margin
:
5px
16px
5px
0
;
border
:
1px
dashed
#333
;
}
}
//
发放员工
//
发放员工
.sale-select
{
.sale-select
{
display
:
flex
;
display
:
flex
;
...
...
src/views/giftBag/giftList.vue
View file @
a1f5f98
...
@@ -11,17 +11,8 @@
...
@@ -11,17 +11,8 @@
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<div>
<div>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData"
>
<GLCombiForm
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData"
></GLCombiForm>
<span
slot=
"footer"
>
<GLButton
style=
"float:right;margin-bottom:10px;"
:size=
"size"
class=
"default-blue-btn"
type=
"default"
fn=
"导出"
@
click=
"handleExport"
>
导出
</GLButton>
<el-button
:size=
"size"
type=
"default"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</span>
</glsx-combi-form>
<glsx-combi-form
ref=
"showSearch"
>
<span
slot=
"footer"
class=
"footer-btns"
>
<GLButton
:size=
"size"
class=
"default-blue-btn"
type=
"default"
fn=
"导出"
@
click=
"handleExport"
>
导出
</GLButton>
</span>
</glsx-combi-form>
</div>
</div>
<!-- 表格区域 开始 -->
<!-- 表格区域 开始 -->
...
@@ -30,6 +21,7 @@
...
@@ -30,6 +21,7 @@
<div
class=
"p-b-12"
>
礼包明细
</div>
<div
class=
"p-b-12"
>
礼包明细
</div>
<div
class=
"gift-detail flex-wrap"
>
<div
class=
"gift-detail flex-wrap"
>
<div
class=
"gift-item"
v-for=
"(item, index) in scope.scope.couponList"
:key=
"index"
>
<div
class=
"gift-item"
v-for=
"(item, index) in scope.scope.couponList"
:key=
"index"
>
<img
:src=
"require(`@/assets/coupon/icon-$
{attrToIcon[item.discountType]}.png`)" />
<p
:class=
"['gift-coupon-name', item.status == '3' ? ' txt-grey' : '']"
>
{{
item
.
couponName
}}
×
{{
item
.
couponAmount
}}
</p>
<p
:class=
"['gift-coupon-name', item.status == '3' ? ' txt-grey' : '']"
>
{{
item
.
couponName
}}
×
{{
item
.
couponAmount
}}
</p>
<p
v-show=
"item.status == '3'"
class=
"gift-tips"
>
已失效
</p>
<p
v-show=
"item.status == '3'"
class=
"gift-tips"
>
已失效
</p>
</div>
</div>
...
@@ -38,12 +30,12 @@
...
@@ -38,12 +30,12 @@
<div
slot=
"name"
slot-scope=
"scope"
>
<div
slot=
"name"
slot-scope=
"scope"
>
<p
class=
"cursor-pointer"
@
click=
"handleDetail(scope.scope)"
>
{{
scope
.
scope
.
name
}}
</p>
<p
class=
"cursor-pointer"
@
click=
"handleDetail(scope.scope)"
>
{{
scope
.
scope
.
name
}}
</p>
</div>
</div>
<div
slot=
"approveStatus"
slot-scope=
"scope"
>
<div
style=
"display: flex;align-items: center;"
slot=
"approveStatus"
slot-scope=
"scope"
>
<span
:style=
"
{ color: approvalStatusColor[scope.scope.approveStatus - 1] }">
{{
approvalStatusVal
[
scope
.
scope
.
approveStatus
-
1
]
}}
</span>
<div
class=
"approve-status"
:style=
"
{ 'background-color': approvalStatusColor[scope.scope.approveStatus - 1] }">
</div>
<span>
{{
approvalStatusVal
[
scope
.
scope
.
approveStatus
-
1
]
}}
</span>
</div>
</div>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLButton
type=
"text"
fn=
"编辑"
@
click=
"handleEdit('edit', scope.scope)"
>
编辑
</GLButton>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope"
:buttonNum=
"3"
></GLTableButton>
<GLButton
type=
"text"
fn=
"删除"
@
click=
"handleDelete(scope.scope)"
>
删除
</GLButton>
</div>
</div>
</GLTable>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 end -->
...
@@ -59,6 +51,40 @@ export default {
...
@@ -59,6 +51,40 @@ export default {
name
:
'giftList'
,
name
:
'giftList'
,
data
()
{
data
()
{
return
{
return
{
attrToIcon
:
{
2
:
'discount'
,
3
:
'cash'
,
4
:
'exchange'
,
7
:
'service'
},
buttonList
:
[
{
type
:
'GLButton'
,
name
:
row
=>
{
return
'编辑'
},
attrs
:
{
type
:
'text'
,
fn
:
'编辑'
},
listeners
:
{
click
:
row
=>
this
.
handleEdit
(
'edit'
,
row
.
scope
)
}
},
{
type
:
'GLButton'
,
name
:
row
=>
{
return
'删除'
},
attrs
:
{
type
:
'text'
,
fn
:
'删除'
},
listeners
:
{
click
:
row
=>
this
.
handleDelete
(
row
.
scope
)
}
}
],
size
:
'small'
,
size
:
'small'
,
url
:
url
,
url
:
url
,
searchForm
:
{
searchForm
:
{
...
@@ -106,7 +132,10 @@ export default {
...
@@ -106,7 +132,10 @@ export default {
getListApi
:
this
.
$apis
.
giftBag
.
getListApi
,
getListApi
:
this
.
$apis
.
giftBag
.
getListApi
,
tableParams
:
{
tableParams
:
{
listName
:
'list'
,
listName
:
'list'
,
tableOption
:
true
,
tableOption
:
{
width
:
120
,
align
:
'center'
},
tableColumns
:
[
tableColumns
:
[
{
{
label
:
''
,
label
:
''
,
...
@@ -130,11 +159,11 @@ export default {
...
@@ -130,11 +159,11 @@ export default {
{
{
label
:
'备注名称'
,
label
:
'备注名称'
,
prop
:
'remarkName'
,
prop
:
'remarkName'
,
width
:
'200'
width
:
150
},
},
{
{
label
:
'预估成本/元'
,
label
:
'预估成本/元'
,
width
:
20
0
,
width
:
15
0
,
prop
:
'anticipatedCost'
,
prop
:
'anticipatedCost'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
(
cellValue
.
anticipatedCost
/
100
).
toFixed
(
2
)
return
(
cellValue
.
anticipatedCost
/
100
).
toFixed
(
2
)
...
@@ -143,12 +172,28 @@ export default {
...
@@ -143,12 +172,28 @@ export default {
{
{
label
:
'发放员工'
,
label
:
'发放员工'
,
prop
:
'staffList'
,
prop
:
'staffList'
,
width
:
20
0
,
width
:
15
0
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
staffList
.
map
(
item
=>
item
.
staffName
).
join
(
','
)
return
cellValue
.
staffList
.
map
(
item
=>
item
.
staffName
).
join
(
','
)
}
}
},
},
{
{
label
:
'已领取'
,
prop
:
'stock'
,
width
:
150
,
formatter
:
cellValue
=>
{
return
cellValue
.
receivedStock
||
'0'
}
},
{
label
:
'待领取'
,
prop
:
''
,
width
:
150
,
formatter
:
cellValue
=>
{
return
+
cellValue
.
stock
-
+
cellValue
.
receivedStock
||
'0'
}
},
{
label
:
'赠送原因'
,
label
:
'赠送原因'
,
width
:
200
,
width
:
200
,
prop
:
'giveReason'
,
prop
:
'giveReason'
,
...
@@ -158,13 +203,14 @@ export default {
...
@@ -158,13 +203,14 @@ export default {
},
},
{
{
label
:
'审批状态'
,
label
:
'审批状态'
,
width
:
150
,
prop
:
'approveStatus'
,
prop
:
'approveStatus'
,
addHtml
:
'approveStatus'
addHtml
:
'approveStatus'
},
},
{
{
label
:
'创建时间'
,
label
:
'创建时间'
,
prop
:
'createdDate'
,
prop
:
'createdDate'
,
width
:
'180'
,
width
:
180
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
dayjs
(
cellValue
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
return
dayjs
(
cellValue
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
}
...
@@ -204,7 +250,7 @@ export default {
...
@@ -204,7 +250,7 @@ export default {
},
},
// 1 审批中;2 审批通过; 3审批驳回 4审批撤销 5待审批
// 1 审批中;2 审批通过; 3审批驳回 4审批撤销 5待审批
// 审批状态 0审批中 1审批通过 2审批驳回
// 审批状态 0审批中 1审批通过 2审批驳回
approvalStatusColor
:
[
'#
FF6D00'
,
'#2CCA74'
,
'#EB4E4E'
,
'#999999'
,
'#999999
'
],
approvalStatusColor
:
[
'#
5850FF'
,
'#2CCA74'
,
'#EB4E4E'
,
'#FDB757'
,
'#FDB757
'
],
approvalStatusVal
:
[
'审批中'
,
'审批通过'
,
'已驳回'
,
'审批撤销'
,
'待审批'
]
approvalStatusVal
:
[
'审批中'
,
'审批通过'
,
'已驳回'
,
'审批撤销'
,
'待审批'
]
}
}
},
},
...
@@ -294,6 +340,7 @@ export default {
...
@@ -294,6 +340,7 @@ export default {
$title
:
encodeURI
(
addOrEdit
==
'add'
?
'新增礼包'
:
'编辑礼包'
)
$title
:
encodeURI
(
addOrEdit
==
'add'
?
'新增礼包'
:
'编辑礼包'
)
}
}
addOrEdit
!=
'add'
&&
(
params
.
id
=
row
.
id
)
addOrEdit
!=
'add'
&&
(
params
.
id
=
row
.
id
)
addOrEdit
!=
'add'
&&
(
params
.
receivedStock
=
row
.
receivedStock
)
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/giftBag/editGift'
,
path
:
'/giftBag/editGift'
,
query
:
params
query
:
params
...
@@ -354,12 +401,28 @@ export default {
...
@@ -354,12 +401,28 @@ export default {
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.p-b-12
{
.p-b-12
{
margin-bottom
:
14px
;
margin-bottom
:
14px
;
font-weight
:
500
;
color
:
#333333
;
}
.approve-status
{
width
:
6px
;
height
:
6px
;
border-radius
:
4px
;
margin-right
:
8px
;
display
:
inline-block
;
}
}
.gift-detail
.gift-item
{
.gift-detail
.gift-item
{
margin-right
:
80px
;
margin-right
:
80px
;
display
:
flex
;
align-items
:
center
;
color
:
#333333
;
img
{
height
:
23px
;
width
:
58px
;
margin-right
:
23px
;
}
.gift-coupon-name
{
.gift-coupon-name
{
display
:
inline-block
;
display
:
inline-block
;
margin-right
:
7px
;
}
}
.gift-tips
{
.gift-tips
{
display
:
inline-block
;
display
:
inline-block
;
...
...
src/views/giftBag/receivedGiftList.vue
View file @
a1f5f98
...
@@ -3,31 +3,36 @@
...
@@ -3,31 +3,36 @@
<div
class=
"marketing"
>
<div
class=
"marketing"
>
<div
class=
"container"
>
<div
class=
"container"
>
<div>
<div>
<
glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData"
></glsx-combi-f
orm>
<
GLCombiForm
ref=
"showSearch"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
:formObj=
"searchForm"
:formData=
"searchFormData"
></GLCombiF
orm>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData1"
>
<
!--
<
glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData1"
>
<span
slot=
"footer"
>
<span
slot=
"footer"
>
<el-button
:size=
"size"
type=
"default"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
:size=
"size"
type=
"default"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</span>
</span>
</glsx-combi-form>
</glsx-combi-form>
-->
<glsx-combi-form
ref=
"showSearch"
>
<
!--
<
glsx-combi-form
ref=
"showSearch"
>
<span
slot=
"footer"
class=
"footer-btns"
>
<span
slot=
"footer"
class=
"footer-btns"
>
-->
<!--
<el-button
:size=
"size"
type=
"default"
@
click=
"handleExport"
>
导出
</el-button>
-->
<!--
<el-button
:size=
"size"
type=
"default"
@
click=
"handleExport"
>
导出
</el-button>
-->
<GLButton
:size=
"size"
class=
"default-blue-btn"
type=
"default"
fn=
"已领取导出"
@
click=
"handleExport"
>
导出
</GLButton>
<!--
<GLButton
:size=
"size"
class=
"default-blue-btn"
type=
"default"
fn=
"已领取导出"
@
click=
"handleExport"
>
导出
</GLButton>
</span>
</span>
</glsx-combi-form>
</glsx-combi-form>
-->
<GLButton
style=
"float:right;margin-bottom:10px;"
:size=
"size"
class=
"default-blue-btn"
type=
"default"
fn=
"已领取导出"
@
click=
"handleExport"
>
导出
</GLButton>
</div>
</div>
<!-- 表格区域 开始 -->
<!-- 表格区域 开始 -->
<GLTable
ref=
"receivedGiftListRef"
:getListApi=
"getListApi"
:hasNum=
"false"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<GLTable
ref=
"receivedGiftListRef"
:getListApi=
"getListApi"
:hasNum=
"false"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<span
slot=
"directionalGiftName"
slot-scope=
"scope"
>
<span
slot=
"directionalGiftName"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
{{
scope
.
scope
.
directionalGiftName
}}
</el-button>
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
{{
scope
.
scope
.
directionalGiftName
}}
</el-button>
<span
v-if=
"scope.scope.receiveStatus == 2"
class=
"void-label"
>
已作废
</span>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"scope.scope.cancelReason"
placement=
"top-start"
>
<p
class=
"void-reason"
v-if=
"scope.scope.receiveStatus == 2"
>
作废原因:
{{
scope
.
scope
.
cancelReason
||
'--'
}}
</p>
</el-tooltip>
</span>
</span>
<div
slot=
"giftInfo"
slot-scope=
"scope"
>
<div
slot=
"giftInfo"
slot-scope=
"scope"
>
<GLTable
ref=
"giftListRef"
:hasNum=
"false"
:hasPage=
"false"
:noDataImg=
"url"
:tableParams=
"giftParams"
:tableData=
"scope.scope | filterTable"
@
setTableFinishFun=
"setGiftTableFinishFun"
></GLTable>
<GLTable
ref=
"giftListRef"
:hasNum=
"false"
:hasPage=
"false"
:noDataImg=
"url"
:tableParams=
"giftParams"
:tableData=
"scope.scope | filterTable"
@
setTableFinishFun=
"setGiftTableFinishFun"
></GLTable>
</div>
</div>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"toVoid(scope.scope)"
>
作废
</el-button>
<el-button
:disabled=
"scope.scope.receiveStatus == 2"
type=
"text"
@
click=
"toVoid(scope.scope)"
>
作废
</el-button>
</div>
</div>
</GLTable>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 end -->
...
@@ -36,8 +41,8 @@
...
@@ -36,8 +41,8 @@
<div
class=
"wrap"
>
<div
class=
"wrap"
>
<p
class=
"dialog-tip"
>
请先和客户沟通在确认,避免引起客诉,作废后客户将不可使用该礼包下所有优惠卷
</p>
<p
class=
"dialog-tip"
>
请先和客户沟通在确认,避免引起客诉,作废后客户将不可使用该礼包下所有优惠卷
</p>
<div
style=
"display:flex;"
>
<div
style=
"display:flex;"
>
<label
style=
"white-space:nowrap;
"
for=
""
>
作废原因:
</label>
<label
class=
"label
"
for=
""
>
作废原因:
</label>
<el-input
type=
"textarea"
v-model=
"
phone
"
placeholder=
"请输入作废原因"
></el-input>
<el-input
type=
"textarea"
v-model=
"
reason"
maxlength=
"50
"
placeholder=
"请输入作废原因"
></el-input>
</div>
</div>
</div>
</div>
</glsx-dialog>
</glsx-dialog>
...
@@ -71,13 +76,16 @@ export default {
...
@@ -71,13 +76,16 @@ export default {
return
{
return
{
size
:
'small'
,
size
:
'small'
,
url
:
url
,
url
:
url
,
curId
:
''
,
reason
:
''
,
voidDialogVisibity
:
false
,
voidDialogVisibity
:
false
,
searchForm
:
{
searchForm
:
{
nickName
:
''
,
nickName
:
''
,
wechatUserFlag
:
''
,
wechatUserFlag
:
''
,
giftName
:
''
,
giftName
:
''
,
staffName
:
''
,
staffName
:
''
,
createDate
:
[]
createDate
:
[],
receiveStatus
:
''
},
},
tableSearchForm
:
{},
tableSearchForm
:
{},
// 搜索
// 搜索
...
@@ -103,9 +111,7 @@ export default {
...
@@ -103,9 +111,7 @@ export default {
optionLabel
:
'Name'
,
optionLabel
:
'Name'
,
optionsName
:
'List'
,
optionsName
:
'List'
,
placeholder
:
'请选择'
placeholder
:
'请选择'
}
},
],
searchFormData1
:
[
{
{
label
:
'发放员工'
,
label
:
'发放员工'
,
name
:
'staffName'
,
name
:
'staffName'
,
...
@@ -117,8 +123,32 @@ export default {
...
@@ -117,8 +123,32 @@ export default {
name
:
'createDate'
,
name
:
'createDate'
,
type
:
'datePicker'
,
type
:
'datePicker'
,
pickerOptions
:
'beforeRangePickerOptions'
pickerOptions
:
'beforeRangePickerOptions'
},
{
label
:
'领取状态'
,
name
:
'receiveStatus'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'Id'
,
optionLabel
:
'Name'
,
optionsName
:
'statusList'
,
placeholder
:
'请选择'
}
}
],
],
// searchFormData1: [
// {
// label: '发放员工',
// name: 'staffName',
// type: 'input',
// placeholder: '请输入'
// },
// {
// label: '领取日期',
// name: 'createDate',
// type: 'datePicker',
// pickerOptions: 'beforeRangePickerOptions'
// }
// ],
baseData
:
{
baseData
:
{
List
:
[
List
:
[
{
{
...
@@ -129,6 +159,16 @@ export default {
...
@@ -129,6 +159,16 @@ export default {
Id
:
'2'
,
Id
:
'2'
,
Name
:
'是'
Name
:
'是'
}
}
],
statusList
:
[
{
Id
:
'1'
,
Name
:
'正常使用'
},
{
Id
:
'2'
,
Name
:
'已作废'
}
]
]
},
},
//礼包详情
//礼包详情
...
@@ -172,7 +212,10 @@ export default {
...
@@ -172,7 +212,10 @@ export default {
getListApi
:
this
.
$apis
.
giftBag
.
getReceivedGiftInfoApi
,
getListApi
:
this
.
$apis
.
giftBag
.
getReceivedGiftInfoApi
,
tableParams
:
{
tableParams
:
{
listName
:
'list'
,
listName
:
'list'
,
tableOption
:
true
,
tableOption
:
{
width
:
100
,
align
:
'center'
},
tableColumns
:
[
tableColumns
:
[
{
{
label
:
''
,
label
:
''
,
...
@@ -195,12 +238,12 @@ export default {
...
@@ -195,12 +238,12 @@ export default {
{
{
label
:
'客户手机号'
,
label
:
'客户手机号'
,
prop
:
'phone'
,
prop
:
'phone'
,
width
:
'110'
width
:
150
},
},
{
{
label
:
'是否为企微客户'
,
label
:
'是否为企微客户'
,
prop
:
'wechatUserFlag'
,
prop
:
'wechatUserFlag'
,
width
:
'200'
,
width
:
150
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
if
(
cellValue
.
wechatUserFlag
==
1
)
{
if
(
cellValue
.
wechatUserFlag
==
1
)
{
return
'否'
return
'否'
...
@@ -282,8 +325,27 @@ export default {
...
@@ -282,8 +325,27 @@ export default {
// 查看
// 查看
handleVoidClose
()
{
handleVoidClose
()
{
this
.
voidDialogVisibity
=
false
this
.
voidDialogVisibity
=
false
this
.
curId
=
''
this
.
reason
=
''
},
},
handleVoidConfirm
()
{
handleVoidConfirm
()
{
if
(
!
this
.
reason
.
trim
())
{
return
this
.
$message
({
message
:
'请输入作废原因!'
,
type
:
'error'
,
customClass
:
'myMessage'
})
}
this
.
$apis
.
giftBag
.
toVoidGift
({
userDirectionalGiftId
:
this
.
curId
,
cancelReason
:
this
.
reason
}).
then
(
res
=>
{
if
(
res
)
{
this
.
handleVoidClose
()
this
.
$message
({
message
:
'操作成功'
,
type
:
'success'
})
this
.
$refs
.
receivedGiftListRef
.
refreshTable
()
}
})
this
.
handleVoidClose
()
this
.
handleVoidClose
()
},
},
handleDetail
(
row
)
{
handleDetail
(
row
)
{
...
@@ -294,7 +356,8 @@ export default {
...
@@ -294,7 +356,8 @@ export default {
}
}
})
})
},
},
toVoid
(
scope
)
{
toVoid
(
row
)
{
this
.
curId
=
row
.
id
this
.
voidDialogVisibity
=
true
this
.
voidDialogVisibity
=
true
},
},
getParams
()
{
getParams
()
{
...
@@ -408,7 +471,8 @@ export default {
...
@@ -408,7 +471,8 @@ export default {
wechatUserFlag
:
''
,
wechatUserFlag
:
''
,
giftName
:
''
,
giftName
:
''
,
staffName
:
''
,
staffName
:
''
,
createDate
:
[]
createDate
:
[],
receiveStatus
:
''
}
}
this
.
handleSearch
()
this
.
handleSearch
()
}
}
...
@@ -426,14 +490,45 @@ export default {
...
@@ -426,14 +490,45 @@ export default {
.marketing
/
deep
/
.el-table
th
div
{
.marketing
/
deep
/
.el-table
th
div
{
line-height
:
normal
!important
;
line-height
:
normal
!important
;
}
}
.void-label
{
width
:
44px
;
height
:
18px
;
display
:
inline-block
;
font-size
:
12px
;
color
:
#999999
;
border-radius
:
2px
;
text-align
:
center
;
line-height
:
18px
;
background
:
#eeeded
;
margin-left
:
4px
;
}
.void-reason
{
font-size
:
10px
;
color
:
#999999
;
width
:
180px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
margin
:
4px
0
0
;
}
.void-dialog
{
.void-dialog
{
/deep/
.el-dialog__body
{
/deep/
.el-dialog__body
{
padding
:
20px
80px
;
padding
:
20px
80px
;
.el-textarea__inner
{
font-family
:
auto
;
}
.wrap
{
.wrap
{
padding-bottom
:
50px
;
padding-bottom
:
50px
;
.dialog-tip
{
.dialog-tip
{
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
.label
{
white-space
:
nowrap
;
margin-top
:
6px
;
}
.el-textarea__inner
{
height
:
72px
;
}
}
}
}
}
}
}
...
...
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