Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
66d0a7c7
Commit
66d0a7c7
authored
May 20, 2019
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增分摊
parent
a405187c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
139 additions
and
1 deletion
+139
-1
lineManagement.vue
src/components/systemManagement/lineManagement.vue
+139
-1
No files found.
src/components/systemManagement/lineManagement.vue
View file @
66d0a7c7
...
...
@@ -551,6 +551,29 @@ input[type="number"] {
</div>
</td>
</tr>
<tr>
<td
class=
"LM_Back"
@
click=
"closeOpTion()"
>
负责OP
</td>
<td
v-for=
"item in getCompanyList"
@
click=
"closeOpTion()"
:key=
"item.subCode"
>
<span
class=
"joinDepart"
v-if=
"!item.seletOpShow"
>
{{
item
.
joinEmployee
|
getJoinEmpName
}}
</span>
<el-select
v-model=
"item.selectOpIdArr"
multiple
class=
'w160 multiple_input'
filterable
@
change=
"getOPSelected(item)"
:placeholder=
"$t('pub.pleaseSel')"
v-if=
"item.seletOpShow"
>
<el-option
v-for=
"item in item.employeeList"
:key=
"item.EmployeeId"
:label=
"item.EmName"
:value=
"item.EmployeeId"
>
</el-option>
</el-select>
<span
class=
"upFentan"
v-if=
"item.selectOpIdArr.length>0"
@
click
.
stop=
"getOPSelectList(item,item.rB_Branch_id)"
>
{{
$t
(
'pub.updateMsg'
)
}}
</span>
<div
v-if=
"item.showOpSet"
>
<span
class=
"joinDepart"
>
{{
$t
(
'Operation.Op_notInvoled'
)
}}
</span>
<span
@
click
.
stop=
"clickedOpSet(item)"
class=
"setItem"
>
{{
$t
(
'leader.leader_Set'
)
}}
</span>
</div>
</td>
</tr>
</table>
<input
type=
"button"
class=
"normalBtn saveCompanyBtn"
@
click=
"saveCompany()"
:value=
"$t('pub.saveBtn')"
/>
<input
type=
"button"
class=
"normalBtn"
@
click=
"isShowTwo=false"
:value=
"$t('pub.cancelBtn')"
/>
...
...
@@ -759,8 +782,11 @@ export default {
this
.
getCompanyList
.
map
(
x
=>
{
x
.
inputShow
=
false
;
x
.
seletShow
=
false
;
x
.
seletOpShow
=
false
;
x
.
departMentList
=
""
;
x
.
employeeList
=
[];
x
.
selectDepIdArr
=
[];
x
.
selectOpIdArr
=
[];
if
(
x
.
lossAllocation
==
null
&&
x
.
inputShow
==
false
)
{
x
.
showSet
=
true
;
}
else
{
...
...
@@ -771,11 +797,21 @@ export default {
}
else
{
x
.
showSelectSet
=
false
;
}
if
(
x
.
joinEmployee
.
length
==
0
&&
x
.
seletOpShow
==
false
){
x
.
showOpSet
=
true
;
}
else
{
x
.
showOpSet
=
false
;
}
if
(
x
.
joinDepartment
.
length
>
0
)
{
x
.
joinDepartment
.
forEach
(
y
=>
{
x
.
selectDepIdArr
.
push
(
y
.
departmentId
);
});
}
if
(
x
.
joinEmployee
.
length
>
0
)
{
x
.
joinEmployee
.
forEach
(
y
=>
{
x
.
selectOpIdArr
.
push
(
y
.
employeeId
);
});
}
});
}
});
...
...
@@ -803,6 +839,31 @@ export default {
});
this
.
getCompanyList
=
tempCompanyList
;
},
getOPSelectList
(
item
,
RB_Branch_Id
)
{
var
tempCompanyList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
getCompanyList
));
tempCompanyList
.
forEach
(
x
=>
{
if
(
x
.
rB_Branch_id
==
item
.
rB_Branch_id
)
{
x
.
seletOpShow
=
true
;
let
userInfo
=
this
.
getLocalStorage
();
var
RB_Group_id
=
userInfo
.
RB_Group_id
;
let
msg
=
{
GroupId
:
userInfo
.
RB_Group_id
,
BranchId
:
item
.
rB_Branch_id
,
DepartmentId
:
'-1'
,
PostId
:
'-1'
,
IsLeave
:
'0'
};
this
.
apipost
(
"admin_get_EmployeeGetList"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
x
.
employeeList
=
res
.
data
.
data
;
}
});
}
});
this
.
getCompanyList
=
tempCompanyList
;
},
getSelected
(
item
)
{
if
(
item
.
selectDepIdArr
.
length
>
0
)
{
let
joinDepartment
=
[];
...
...
@@ -828,6 +889,29 @@ export default {
item
.
seletShow
=
false
;
}
},
getOPSelected
(
item
){
if
(
item
.
selectOpIdArr
.
length
>
0
)
{
let
ckedJoinEmployee
=
[];
item
.
selectOpIdArr
.
forEach
(
x
=>
{
ckedJoinEmployee
.
push
({
EmployeeId
:
x
,
employeeName
:
""
,
});
});
ckedJoinEmployee
.
forEach
(
x
=>
{
item
.
employeeList
.
forEach
(
y
=>
{
if
(
x
.
EmployeeId
===
y
.
EmployeeId
)
{
x
.
employeeName
=
y
.
EmName
;
}
});
});
item
.
joinEmployee
=
ckedJoinEmployee
;
}
else
{
item
.
joinEmployee
=
[];
item
.
showOpSet
=
true
;
item
.
seletOpShow
=
false
;
}
},
setInput
(
item
)
{
item
.
inputShow
=
false
;
if
(
item
.
lossAllocation
==
null
)
{
...
...
@@ -866,6 +950,30 @@ export default {
});
this
.
getCompanyList
=
tempCompanyList
;
},
//点击设置OP开始设置
clickedOpSet
(
item
){
var
tempCompanyList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
getCompanyList
));
tempCompanyList
.
forEach
(
x
=>
{
if
(
x
.
rB_Branch_id
==
item
.
rB_Branch_id
)
{
let
userInfo
=
this
.
getLocalStorage
();
var
RB_Group_id
=
userInfo
.
RB_Group_id
;
let
msg
=
{
GroupId
:
userInfo
.
RB_Group_id
,
BranchId
:
item
.
rB_Branch_id
,
DepartmentId
:
'-1'
,
PostId
:
'-1'
,
IsLeave
:
'0'
};
this
.
apipost
(
"admin_get_EmployeeGetList"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
x
.
employeeList
=
res
.
data
.
data
;
}
});
(
x
.
seletOpShow
=
true
),
(
x
.
showOpSet
=
false
);
}
});
this
.
getCompanyList
=
tempCompanyList
;
},
clearInfo
()
{
this
.
addMsg
=
{
lineId
:
0
,
...
...
@@ -891,6 +999,7 @@ export default {
},
saveCompany
()
{
var
lineBranchList
=
[];
var
lineBranchOPList
=
[];
this
.
getCompanyList
.
forEach
(
x
=>
{
if
(
x
.
joinDepartment
.
length
>
0
)
{
x
.
joinDepartment
.
forEach
(
y
=>
{
...
...
@@ -902,10 +1011,20 @@ export default {
lineBranchList
.
push
(
lineBranch
);
});
}
if
(
x
.
joinEmployee
.
length
>
0
){
x
.
joinEmployee
.
forEach
(
y
=>
{
var
opBranch
=
{
rB_Branch_id
:
x
.
rB_Branch_id
,
EmployeeId
:
y
.
EmployeeId
};
lineBranchOPList
.
push
(
opBranch
);
});
}
});
let
msg
=
{
lineId
:
this
.
upLineId
,
lineBranchList
:
lineBranchList
lineBranchList
:
lineBranchList
,
lineBranchOPList
:
lineBranchOPList
};
this
.
apipost
(
"line_Set_join_branch"
,
...
...
@@ -964,6 +1083,14 @@ export default {
x
.
showSelectSet
=
true
;
}
});
},
closeOpTion
(){
this
.
getCompanyList
.
forEach
(
x
=>
{
x
.
seletOpShow
=
false
;
if
(
x
.
selectOpIdArr
.
length
==
0
)
{
x
.
showOpSet
=
true
;
}
});
}
},
mounted
()
{
...
...
@@ -981,6 +1108,17 @@ export default {
returnStr
=
depName
.
join
(
","
);
}
return
returnStr
;
},
getJoinEmpName
:
function
(
depList
){
let
returnStr
=
""
;
if
(
depList
.
length
>
0
)
{
let
depName
=
[];
depList
.
forEach
(
x
=>
{
depName
.
push
(
x
.
employeeName
);
});
returnStr
=
depName
.
join
(
","
);
}
return
returnStr
;
}
}
};
...
...
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