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 a5be204b
authored
Sep 05, 2022
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
月中定向礼包员工添加搜索
1 parent
308bab6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
19 deletions
src/views/giftBag/editGift.vue
src/views/giftBag/selectStaffDialog.vue
src/views/giftBag/editGift.vue
View file @
a5be204
...
...
@@ -66,10 +66,10 @@
<el-radio
:label=
"2"
>
指定车架号后6位
</el-radio>
</el-radio-group>
<div
:style=
"
{ 'margin-left': defaultLabelWidth }">
<el-input
:style=
"editForm.receiveRule === 4
?'margin-top: -22px;margin-left: 8px;':
''"
@
blur=
"formatPhone"
type=
"textarea"
v-model=
"phone"
:placeholder=
"placeholder"
></el-input>
<el-input
:style=
"editForm.receiveRule === 4
? 'margin-top: -22px;margin-left: 8px;' :
''"
@
blur=
"formatPhone"
type=
"textarea"
v-model=
"phone"
:placeholder=
"placeholder"
></el-input>
<p
v-if=
"editForm.receiveRule !== 4"
class=
"approval-tip"
>
客户需准确输入该
{{
receiveWay
==
1
?
'手机号码'
:
'车架号后6位'
}}
才能成功领取
</p>
<div
:style=
"editForm.receiveRule === 4 ? 'margin-left: 7px;' : ''"
>
<div
:class=
"['tel-item', !item.valid ? 'valid-tel'
: receiveWay == 1?'realTel':
'realNum']"
v-for=
"(item, index) in phoneList"
:key=
"index"
>
<div
:class=
"['tel-item', !item.valid ? 'valid-tel'
: receiveWay == 1 ? 'realTel' :
'realNum']"
v-for=
"(item, index) in phoneList"
:key=
"index"
>
{{
item
.
tel
}}
<i
style=
"cursor:pointer"
class=
"el-icon-close"
@
click=
"delPhone(item.tel)"
></i>
</div>
...
...
@@ -130,7 +130,18 @@
<el-button
type=
"primary"
@
click=
"handleConfirm"
size=
"medium"
:loading=
"loading"
>
提交
</el-button>
</GLFooter>
<select-gift-dialog
v-if=
"isSelectGiftVisible"
:isSelectGiftVisible=
"isSelectGiftVisible"
:selectedGiftList=
"selectedGiftList"
@
handleGiftConfirm=
"handleGiftConfirm"
@
handleGiftClose=
"handleGiftClose"
></select-gift-dialog>
<select-staff-dialog
v-if=
"isMutiSelectVisible"
:isMutiSelectVisible=
"isMutiSelectVisible"
:searchForm=
"searchStaffForm"
:selectedStaffList=
"selectedStaffList"
@
handleMutiSelectConfirm=
"handleMutiSelectConfirm"
@
handleMutiSelectClose=
"handleMutiSelectClose"
></select-staff-dialog>
<select-staff-dialog
ref=
"staffDialog"
:searchForm=
"tableSearchForm"
v-if=
"isMutiSelectVisible"
:isMutiSelectVisible=
"isMutiSelectVisible"
:selectedStaffList=
"selectedStaffList"
@
handleMutiSelectConfirm=
"handleMutiSelectConfirm"
@
handleMutiSelectClose=
"handleMutiSelectClose"
>
<div
slot=
"search"
>
<el-form
class=
"search-staff"
:inline=
"true"
:model=
"tableSearchForm"
>
<el-form-item
size=
"small"
label=
"员工"
>
<el-input
clearable
v-model=
"tableSearchForm.staffName"
placeholder=
"请输入员工姓名"
></el-input>
</el-form-item>
<el-form-item
size=
"small"
class=
"emp-form-btn"
>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</el-form-item>
</el-form>
</div>
</select-staff-dialog>
</div>
</
template
>
<
script
>
...
...
@@ -144,6 +155,7 @@ export default {
phone
:
''
,
isLoaded
:
true
,
loading
:
false
,
tableSearchForm
:
{
staffName
:
''
},
phoneList
:
[],
size
:
'small'
,
title
:
'新增礼包'
,
...
...
@@ -153,7 +165,6 @@ export default {
},
// 选择员工弹窗
isMutiSelectVisible
:
false
,
searchStaffForm
:
{},
selectedStaffList
:
[],
// 选择定向礼包弹窗
isSelectGiftVisible
:
false
,
...
...
@@ -290,13 +301,13 @@ export default {
label
:
'库存数量'
,
name
:
'stock'
,
addHtml
:
'stockNumInput'
,
isHide
:
false
,
isHide
:
false
},
{
label
:
'审批要求'
,
name
:
'approveFlag'
,
addHtml
:
'approvalSlot'
,
isHide
:
false
,
isHide
:
false
},
{
label
:
'领取规则设置'
,
...
...
@@ -328,7 +339,7 @@ export default {
}
],
suffixSlot
:
'configSlot'
,
handleRadioChange
:
(
e
)
=>
{
handleRadioChange
:
e
=>
{
if
(
e
==
4
)
{
this
.
receiveWay
=
1
}
...
...
@@ -369,7 +380,7 @@ export default {
label
:
'发放员工'
,
name
:
'staffList'
,
addHtml
:
'selectStaffBtn'
,
isHide
:
false
,
isHide
:
false
},
{
label
:
''
,
...
...
@@ -429,7 +440,7 @@ export default {
this
.
editForm
.
staffList
=
[]
this
.
editForm
.
stock
=
1
}
}
,
}
},
computed
:
{
placeholder
()
{
...
...
@@ -454,6 +465,10 @@ export default {
}
},
methods
:
{
//员工查询
handleSearch
()
{
this
.
$refs
?.
staffDialog
?.
getList
()
},
resetTextArea
()
{
this
.
phone
=
''
this
.
phoneList
=
[]
...
...
@@ -616,6 +631,7 @@ export default {
},
handleMutiSelectClose
()
{
this
.
isMutiSelectVisible
=
!
this
.
isMutiSelectVisible
this
.
tableSearchForm
.
staffName
=
''
},
handleMutiSelectConfirm
(
selectedData
)
{
this
.
editForm
.
staffList
=
[]
...
...
@@ -694,7 +710,7 @@ export default {
lock
:
true
,
text
:
'正在Loading···'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.
5
)'
,
background
:
'rgba(0, 0, 0, 0.
3
)'
,
customClass
:
'loadingClass'
})
this
.
$apis
.
giftBag
...
...
@@ -728,7 +744,7 @@ export default {
.
then
(()
=>
{
this
.
cancelJump
()
})
.
catch
(()
=>
{
})
.
catch
(()
=>
{})
}
else
{
this
.
cancelJump
()
}
...
...
@@ -976,4 +992,9 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
.search-staff
{
.el-form-item
{
margin-right
:
20px
;
}
}
</
style
>
src/views/giftBag/selectStaffDialog.vue
View file @
a5be204
<!-- 选择员工弹窗 -->
<
template
>
<GLDialog
class=
"muti-pro"
bigTitle=
"选择员工"
mode=
"big"
:before-close=
"handleMutiSelectClose"
:visible
.
sync=
"isMutiSelectVisible"
@
onOk=
"handleMutiSelectConfirm"
@
onCancel=
"handleMutiSelectClose"
v-loading=
"loading"
>
<div
class=
"noproDiv"
v-show=
"!staffList.length && fnCallBack"
>
<GLDialog
class=
"muti-pro"
:close-on-click-modal=
"false"
bigTitle=
"选择员工"
mode=
"big"
:before-close=
"handleMutiSelectClose"
:visible
.
sync=
"isMutiSelectVisible"
@
onOk=
"handleMutiSelectConfirm"
@
onCancel=
"handleMutiSelectClose"
v-loading=
"loading"
>
<
!--
<
div
class=
"noproDiv"
v-show=
"!staffList.length && fnCallBack"
>
<img
src=
"@/assets/noPro.png"
/>
<p
class=
"noproP"
>
系统暂无已创建的员工
</p>
</div>
<div
v-show=
"staffList.length"
>
</div>
-->
<div>
<slot
name=
"search"
></slot>
<GLTable
v-loading=
"loading"
ref=
"mutiProRef"
:tableData=
"staffList"
:pageConf=
"pageConf"
:noDataImg=
"url"
:tableParams=
"tableParams"
@
refreshTable=
"getList"
></GLTable>
</div>
...
...
@@ -25,6 +25,9 @@ export default {
fnCallBack
:
false
,
url
:
url
,
loading
:
true
,
tableSearchForm
:
{
staffName
:
''
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
// 表格参数
tableParams
:
{
...
...
@@ -58,7 +61,7 @@ export default {
},
searchForm
:
{
type
:
Object
,
default
:
()
=>
{
}
default
:
()
=>
{}
},
selectedStaffList
:
{
type
:
Array
,
...
...
@@ -69,7 +72,7 @@ export default {
mounted
()
{
this
.
userInfo
=
this
.
$globalState
.
session
this
.
selectList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
selectedStaffList
))
this
.
selectList
.
map
(
item
=>
item
.
userOneId
=
item
.
staffUUID
)
this
.
selectList
.
map
(
item
=>
(
item
.
userOneId
=
item
.
staffUUID
)
)
this
.
getList
({},
true
)
},
...
...
@@ -102,7 +105,6 @@ export default {
this
.
selectedStaffList
.
forEach
(
row
=>
{
row
.
userOneId
=
row
.
staffUUID
this
.
$nextTick
(()
=>
{
let
idx
=
this
.
$refs
.
mutiProRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
.
findIndex
(
item
=>
item
.
userOneId
==
row
.
staffUUID
)
if
(
idx
>
-
1
)
{
try
{
...
...
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