Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
office-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
office
office-web
Commits
c9c8cd3e
Commit
c9c8cd3e
authored
Jan 22, 2019
by
xiaohai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stay back
parent
e7eae828
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
98 additions
and
78 deletions
+98
-78
1.xlsx
src/assets/recordTemplate/1.xlsx
+0
-0
通讯录-门店架构导入模板.xlsx
src/assets/recordTemplate/通讯录-门店架构导入模板.xlsx
+0
-0
vueSelectEmployee.vue
src/components/common/vueSelectEmployee.vue
+46
-59
employeeInfo.vue
src/components/contacts/employeeInfo.vue
+2
-2
clerkInfo.vue
src/components/contacts/storeFrame/clerkInfo.vue
+12
-2
storeInfo.vue
src/components/contacts/storeFrame/storeInfo.vue
+3
-3
editableCell.vue
src/components/employeeRecord/editableCell.vue
+19
-2
employeeIo.vue
src/views/contacts/employeeIo.vue
+4
-1
recordInfo.vue
src/views/contacts/recordInfo.vue
+1
-1
storeFrame.vue
src/views/contacts/storeFrame.vue
+3
-3
storeInfo.vue
src/views/contacts/storeInfo.vue
+4
-4
storeIo.vue
src/views/contacts/storeIo.vue
+4
-1
No files found.
src/assets/recordTemplate/1.xlsx
0 → 100644
View file @
c9c8cd3e
File added
src/assets/recordTemplate/通讯录-门店架构导入模板.xlsx
0 → 100644
View file @
c9c8cd3e
File added
src/components/common/vueSelectEmployee.vue
View file @
c9c8cd3e
...
...
@@ -44,8 +44,8 @@
</p>
<div
class=
"tree-div"
>
<ul
class=
"selected-list"
>
<template
v-if=
"selectedList.length > 0"
v-for=
"li in selectedList"
>
<li
class=
"list group-li"
:class=
"li.groupId ? 'group-li' : 'person-li'"
:key=
"li.id+li.label"
>
<template
v-if=
"selectedList.length > 0"
>
<li
v-for=
"li in selectedList"
class=
"list group-li"
:class=
"li.groupId ? 'group-li' : 'person-li'"
:key=
"li.id+li.label"
>
<div
class=
"label"
>
<i
class=
"iconfont"
:class=
"li.groupId ? 'icon-tongshi-zuzhijiagou' : 'icon-chengyuan'"
></i>
{{
li
.
label
}}
</div>
...
...
@@ -122,11 +122,33 @@
};
},
methods
:
{
/**
* 获取分组架构
*/
getGroupData
()
{
let
_this
=
this
;
let
params
=
{
isStoreGroup
:
0
};
getRequest
(
"/haoban-manage-web/dept/deptListForCompany"
,
params
)
.
then
(
res
=>
{
let
treeData
=
[];
let
personData
=
[];
if
(
res
.
data
.
errorCode
==
1
)
{
treeData
=
res
.
data
.
result
.
departmentList
||
[];
personData
=
res
.
data
.
result
.
searchList
||
[]
_this
.
formatGroupData
(
treeData
,
personData
);
}
})
.
catch
(
e
=>
{
console
.
log
(
e
,
"error"
);
});
},
formatGroupData
(
treeData
,
personData
)
{
let
_this
=
this
;
let
data
=
treeData
.
slice
(
0
)
;
let
employees
=
personData
.
slice
(
0
)
;
let
copyData
=
data
.
slice
(
0
)
;
let
data
=
treeData
;
let
employees
=
personData
;
let
copyData
=
data
;
let
onlyGroup
=
_this
.
onlyGroup
;
this
.
menuData
=
[];
this
.
defaultOpen
=
[];
...
...
@@ -142,9 +164,6 @@
if
(
onlyGroup
.
indexOf
(
group
.
groupId
)
>
-
1
)
{
group
.
disableOpen
=
false
;
group
.
disabled
=
true
;
}
else
{
group
.
disabled
=
true
;
group
.
disableOpen
=
true
;
}
}
else
{
group
.
disabled
=
_this
.
onlyPerson
?
true
:
group
.
hasPression
==
1
?
false
:
true
;
...
...
@@ -160,9 +179,6 @@
if
(
cG
.
parentId
==
group
.
groupId
)
{
arr
.
push
(
cG
);
}
}
else
{
cG
.
disabled
=
true
;
cG
.
disableOpen
=
true
;
}
}
else
{
cG
.
disabled
=
_this
.
onlyPerson
?
true
:
cG
.
hasPression
==
1
?
false
:
true
;
...
...
@@ -200,6 +216,9 @@
}
_this
.
menusObj
[
group
.
id
]
=
group
;
});
if
(
this
.
defaultSelection
&&
this
.
treeSet
.
dialogVisible
)
{
this
.
renderDefault
();
}
},
/**
* 树形菜单选择
...
...
@@ -257,24 +276,8 @@
submitSelected
()
{
this
.
$emit
(
"handleSelectedList"
,
this
.
treeSet
.
isSingle
?
this
.
selectedList
[
0
]
:
this
.
selectedList
);
this
.
treeSet
.
dialogVisible
=
false
;
}
},
mounted
()
{
console
.
log
(
this
.
$refs
,
"this"
);
},
watch
:
{
searchText
(
newK
,
old
)
{
this
.
$refs
.
tree
.
filter
(
newK
);
},
treeData
(
newData
)
{
// let treeData = [].concat(JSON.parse(JSON.stringify(newData.treeData)));
// let personData = [].concat(JSON.parse(JSON.stringify(newData.personData)));
this
.
formatGroupData
(
newData
.
treeData
,
newData
.
personData
);
},
treeSet
(
obj
)
{
if
(
obj
.
dialogVisible
)
{
this
.
formatGroupData
(
this
.
treeData
.
treeData
,
this
.
treeData
.
personData
);
if
(
this
.
defaultSelection
)
{
renderDefault
()
{
let
list
=
this
.
defaultSelection
;
this
.
$nextTick
(()
=>
{
console
.
log
(
this
.
$refs
,
"this"
);
...
...
@@ -289,40 +292,24 @@
});
});
}
},
mounted
()
{
this
.
getGroupData
();
},
watch
:
{
searchText
(
newK
,
old
)
{
this
.
$refs
.
tree
.
filter
(
newK
);
},
treeSet
:
{
handler
(
newValue
,
oldValue
)
{
if
(
newValue
.
dialogVisible
)
{
this
.
renderDefault
();
}
},
// defaultSelection(list) {
// console.log(list);
// this.$nextTick(() => {
// console.log(this.$refs, "this");
// this.selectedList = list;
// this.$refs.tree.setCheckedNodes(list);
// list.forEach(li => {
// if (li.employeeClerkId) {
// this.defaultOpen = [li.departmentId];
// } else {
// this.defaultOpen.push(this.menusObj[li.id].parentId);
// }
// });
// });
// },
deep
:
true
},
changed
()
{
// this.formatGroupData(this.treeData.treeData, this.treeData.personData);
if
(
this
.
defaultSelection
)
{
let
list
=
this
.
defaultSelection
;
this
.
$nextTick
(()
=>
{
console
.
log
(
this
.
$refs
,
"this"
);
this
.
selectedList
=
list
;
this
.
$refs
.
tree
.
setCheckedNodes
(
list
);
list
.
forEach
(
li
=>
{
if
(
li
.
employeeClerkId
)
{
this
.
defaultOpen
=
[
li
.
departmentId
];
}
else
{
this
.
defaultOpen
.
push
(
this
.
menusObj
[
li
.
id
].
parentId
);
}
});
});
}
this
.
getGroupData
();
}
}
};
...
...
src/components/contacts/employeeInfo.vue
View file @
c9c8cd3e
...
...
@@ -12,7 +12,7 @@
<el-input
v-model=
"info.name"
></el-input>
</el-form-item>
<el-form-item
label=
"手机号"
prop=
"phoneNumber"
>
<el-input
v-model=
"info.phoneNumber"
></el-input>
<el-input
v-model=
"info.phoneNumber"
:disabled=
"!isNew"
></el-input>
</el-form-item>
<el-form-item
label=
"部门"
prop=
"departmentId"
>
<el-input
v-model=
"info.departmentName"
@
focus=
"callGroupSelector"
:disabled=
"disabled"
suffix-icon=
"el-icon-arrow-down"
></el-input>
...
...
@@ -50,7 +50,7 @@
// info: {
// type: Object,
// required: true
// }
// }
,
isNew
:
{
type
:
Boolean
,
default
:
false
...
...
src/components/contacts/storeFrame/clerkInfo.vue
View file @
c9c8cd3e
...
...
@@ -10,7 +10,7 @@
<el-input
v-model=
"clerkInfo.name"
></el-input>
</el-form-item>
<el-form-item
label=
"手机号"
prop=
"phoneNumber"
>
<el-input
v-model=
"clerkInfo.phoneNumber"
></el-input>
<el-input
v-model=
"clerkInfo.phoneNumber"
:disabled=
"!isAddnew"
></el-input>
</el-form-item>
<el-form-item
label=
"门店"
prop=
"storeName"
>
<el-input
v-model=
"clerkInfo.storeName"
@
focus=
"callSelector"
></el-input>
...
...
@@ -39,6 +39,10 @@ export default {
isAddnew
:
{
type
:
Boolean
,
default
:
false
},
perId
:
{
type
:
[
String
,
Number
],
default
:
""
}
},
components
:
{
...
...
@@ -167,7 +171,7 @@ export default {
getClerkInfo
()
{
let
ths
=
this
;
let
params
=
{
id
:
ths
.
$route
.
query
.
clerk
Id
id
:
!!
ths
.
$route
.
query
.
clerkId
?
ths
.
$route
.
query
.
clerkId
:
ths
.
per
Id
};
getRequest
(
"/haoban-manage-web/emp/findOne"
,
params
)
.
then
(
res
=>
{
...
...
@@ -190,6 +194,12 @@ export default {
console
.
log
(
this
.
isAddnew
,
"dsdfsed"
);
if
(
!
this
.
isAddnew
)
this
.
getClerkInfo
();
},
watch
:
{
perId
(
id
,
ids
)
{
console
.
log
(
id
,
ids
);
this
.
getClerkInfo
(
id
);
}
}
};
</
script
>
...
...
src/components/contacts/storeFrame/storeInfo.vue
View file @
c9c8cd3e
...
...
@@ -10,8 +10,8 @@
<template
slot=
"suffix"
>
{{
storeInfo
.
storeName
?
storeInfo
.
storeName
.
length
:
0
}}
/20
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"所属分组"
prop=
"
group
"
>
<el-input
v-model=
"storeInfo.
groupChain
Name"
@
focus=
"callSelector"
>
<el-form-item
label=
"所属分组"
prop=
"
departmentName
"
>
<el-input
v-model=
"storeInfo.
department
Name"
@
focus=
"callSelector"
>
<i
slot=
"suffix"
class=
"el-input__icon el-icon-arrow-down"
></i>
</el-input>
</el-form-item>
...
...
@@ -178,7 +178,7 @@ export default {
this
.
treeSet
.
dialogVisible
=
true
;
},
handleSelectedList
(
list
)
{
this
.
storeInfo
.
groupChain
Name
=
list
[
0
].
label
;
this
.
storeInfo
.
department
Name
=
list
[
0
].
label
;
this
.
storeInfo
.
storeGroupId
=
list
[
0
].
id
;
},
selected
(
val
)
{
...
...
src/components/employeeRecord/editableCell.vue
View file @
c9c8cd3e
...
...
@@ -15,7 +15,8 @@
<template
v-for=
"(item, idx) in fieldList"
>
<el-form-item
:label=
"item.title+':'"
class=
"item-width"
:key=
"item.fieldCode+'_'+idx"
:prop=
"item.fieldCode"
>
<template
v-if=
"showEdit"
>
<el-input
v-model=
"info[item.fieldCode]"
v-if=
"item.fieldType == 0 || item.fieldType == 6"
:placeholder=
"item.fieldDescription"
:disabled=
"item.fieldCode == 'clerkName' || item.fieldCode == 'clerkPhone'"
></el-input>
<el-input
v-model=
"info[item.fieldCode]"
v-if=
"item.fieldType == 0"
:placeholder=
"item.fieldDescription"
:disabled=
"item.fieldCode == 'clerkName' || item.fieldCode == 'clerkPhone'"
></el-input>
<el-input
v-model=
"info[item.fieldCode]"
@
change=
"onNumber(info[item.fieldCode])"
v-if=
"item.fieldType == 6"
:placeholder=
"item.fieldDescription"
:disabled=
"item.fieldCode == 'clerkName' || item.fieldCode == 'clerkPhone'"
></el-input>
<el-input
v-model=
"info[item.fieldCode]"
v-else-if=
"item.fieldType == 1"
type=
"textarea"
autosize
></el-input>
<template
v-else-if=
"item.fieldType == 2 || item.fieldType == 3"
>
...
...
@@ -138,6 +139,9 @@ export default {
};
},
methods
:
{
onNumber
(
e
)
{
console
.
log
(
e
);
},
uploadOnSuccess
(
res
,
list
)
{
console
.
log
(
res
);
res
.
file
.
url
=
res
.
res
.
result
[
0
].
qcloudImageUrl
;
...
...
@@ -208,6 +212,7 @@ export default {
});
},
cancelEdit
()
{
this
.
$refs
.
cell_form
.
clearValidate
();
let
nowObj
=
this
.
info
;
let
oldObj
=
this
.
staticInfo
;
for
(
let
key
in
nowObj
)
{
...
...
@@ -225,6 +230,18 @@ export default {
let
ths
=
this
;
let
obj
=
{};
let
fields
=
ths
.
fieldList
;
let
onlyNum
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
)
{
let
reg
=
new
RegExp
(
"^[0-9]*$"
);;
if
(
!
reg
.
test
(
value
*
1
))
{
return
callback
(
new
Error
(
"请输入数字!"
));
}
else
{
return
callback
();
}
}
else
{
return
callback
();
}
};
fields
.
forEach
(
field
=>
{
let
arr
=
[];
if
(
!!
field
.
isMust
)
{
...
...
@@ -259,7 +276,7 @@ export default {
}
}
if
(
field
.
fieldType
==
6
)
{
arr
.
push
({
type
:
'number'
,
message
:
field
.
fieldName
+
'必须为数字值'
});
arr
.
push
({
validator
:
onlyNum
,
message
:
field
.
fieldName
+
'必须为数字'
,
trigger
:
"change"
});
}
obj
[
field
.
fieldCode
]
=
arr
;
});
...
...
src/views/contacts/employeeIo.vue
View file @
c9c8cd3e
...
...
@@ -20,7 +20,10 @@
<div
class=
"handle-area import"
v-if=
"type == 'import'"
>
<div
class=
"step-div"
style=
"margin-bottom :90px;"
>
<span
class=
"ft-large"
>
①
</span>
下载员工通讯录模板,统一收集员工信息
<a
href=
"http://www.gicdev.com/haoban-manage-web/excel/通讯录-行政架构导入模板.xls"
class=
"d-u-btn"
>
<!--
<a
href=
"http://www.gicdev.com/haoban-manage-web/excel/通讯录-行政架构导入模板.xls"
class=
"d-u-btn"
>
<el-button
type=
"primary"
>
下载
<i
class=
"iconfont icon-icon_yunxiazai m-l-5"
></i></el-button>
</a>
-->
<a
href=
"#/assets/recordTemplate/1.xlsx"
download=
"通讯录-行政架构导入模板.xlsx"
>
<el-button
type=
"primary"
>
下载
<i
class=
"iconfont icon-icon_yunxiazai m-l-5"
></i></el-button>
</a>
</div>
...
...
src/views/contacts/recordInfo.vue
View file @
c9c8cd3e
...
...
@@ -9,7 +9,7 @@
<div
class=
"employee-detail-cell"
>
<div
class=
"head-info"
>
<p
class=
"head-cell"
><img
:src=
"info.headPic"
class=
"head-img"
></p>
<p
class=
"head-cell name"
>
{{
info
.
clerkName
}}
<span>
{{
statusList
[
info
.
clerkStatus
-
1
]
}}
</span></p>
<p
class=
"head-cell name"
>
{{
info
.
clerkName
}}
<span>
{{
info
.
clerkStatus
==
'-1'
?
"无状态"
:
statusList
[
info
.
clerkStatus
-
1
]
}}
</span></p>
<p
class=
"head-cell c-303133"
>
{{
info
.
groupName
}}{{
info
.
positionName
}}
</p>
<p
class=
"head-cell"
>
已在
{{
info
.
enterpriseName
}}
工作了
{{
info
.
days
}}
天
</p>
</div>
...
...
src/views/contacts/storeFrame.vue
View file @
c9c8cd3e
...
...
@@ -26,7 +26,7 @@
</div>
</
template
>
</search-menu>
<clerk-info
v-if=
"showEmployee == 'employee'"
:
clerkInfo=
"selectedEmployee
"
></clerk-info>
<clerk-info
v-if=
"showEmployee == 'employee'"
:
perId=
"perId
"
></clerk-info>
<store-info
ref=
"store_info"
v-else-if=
"showEmployee == 'store'"
:storeInfo=
"storeInfo"
></store-info>
<div
class=
"sf-right-container common-right-container"
v-else
...
...
@@ -129,7 +129,7 @@ export default {
storeList
:
[],
tableView
:
1
,
showEmployee
:
'node'
,
selectedEmployee
:
{}
,
perId
:
""
,
storeInfo
:
{},
disableBtn
:
true
,
storeStatus
:
""
,
...
...
@@ -159,7 +159,7 @@ export default {
*/
handleEmployeeSelection
(
employee
,
showEmployee
)
{
console
.
log
(
employee
,
showEmployee
);
this
.
selectedEmployee
=
employee
;
this
.
perId
=
employee
.
employeeClerkId
;
this
.
showEmployee
=
showEmployee
;
},
/**
...
...
src/views/contacts/storeInfo.vue
View file @
c9c8cd3e
...
...
@@ -13,8 +13,8 @@
<template
slot=
"suffix"
>
{{
storeInfo
.
storeName
?
storeInfo
.
storeName
.
length
:
0
}}
/20
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"所属分组"
prop=
"
groupChain
Name"
>
<el-input
v-model=
"storeInfo.
groupChain
Name"
@
focus=
"callSelector"
>
<el-form-item
label=
"所属分组"
prop=
"
department
Name"
>
<el-input
v-model=
"storeInfo.
department
Name"
@
focus=
"callSelector"
>
<i
slot=
"suffix"
class=
"el-input__icon el-icon-arrow-down"
></i>
</el-input>
</el-form-item>
...
...
@@ -92,7 +92,7 @@
</el-input>
</el-form-item>
<el-form-item
label=
"手机号码"
prop=
"managerPhoneNumber"
>
<el-input
v-model=
"storeInfo.managerPhoneNumber"
:disabled=
"!isNew"
></el-input>
<el-input
v-model=
"storeInfo.managerPhoneNumber"
:disabled=
"!isNew
&& !!storeInfo.managerPhoneNumber
"
></el-input>
</el-form-item>
<el-form-item
label=
"店长性别"
>
<el-radio-group
v-model=
"storeInfo.managerSex"
>
...
...
@@ -250,7 +250,7 @@ export default {
this
.
treeSet
.
dialogVisible
=
true
;
},
handleSelectedList
(
list
)
{
this
.
storeInfo
.
groupChain
Name
=
list
[
0
].
label
;
this
.
storeInfo
.
department
Name
=
list
[
0
].
label
;
this
.
storeInfo
.
storeGroupId
=
list
[
0
].
id
;
},
selected
(
val
)
{
...
...
src/views/contacts/storeIo.vue
View file @
c9c8cd3e
...
...
@@ -22,7 +22,10 @@
<div
class=
"handle-area import"
v-if=
"type == 'import'"
>
<div
class=
"step-div"
style=
"margin-bottom :90px;"
>
<span
class=
"ft-large"
>
①
</span>
下载门店导入模板,批量填写门店信息
<a
href=
"http://www.gicdev.com/haoban-manage-web/excel/通讯录-门店架构导入模板.xlsx"
class=
"d-u-btn"
>
<!--
<a
href=
"http://www.gicdev.com/haoban-manage-web/excel/通讯录-门店架构导入模板.xlsx"
class=
"d-u-btn"
>
<el-button
type=
"primary"
>
下载
<i
class=
"iconfont icon-icon_yunxiazai m-l-5"
></i></el-button>
</a>
-->
<a
href=
"#/assets/recordTemplate/1.xlsx"
download=
"通讯录-门店架构导入模板.xlsx"
class=
"d-u-btn"
>
<el-button
type=
"primary"
>
下载
<i
class=
"iconfont icon-icon_yunxiazai m-l-5"
></i></el-button>
</a>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment