Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
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
罗超
confucius
Commits
617ccab7
Commit
617ccab7
authored
Nov 20, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
4b61ec6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
114 additions
and
146 deletions
+114
-146
CostType.vue
src/pages/financial/CostType.vue
+114
-146
No files found.
src/pages/financial/CostType.vue
View file @
617ccab7
...
...
@@ -10,7 +10,13 @@
.fc_red
{
color
:
#E95252
!important
}
.cmc_item
:hover
{
box-shadow
:
0px
0px
20px
rgba
(
191
,
191
,
191
,
1
);
transition
:
all
linear
0.5s
;}
._underline
{
text-decoration
:
underline
;
cursor
:
pointer
;}
.CostType
._vMG_edit
{
display
:
none
;
position
:
absolute
;
bottom
:
0
;
font-family
:
'PingFangSc-Fine'
;
left
:
0
;
border-top
:
3px
solid
#38425d
;
background-color
:
#fff
;
padding
:
10px
;
width
:
100%
;
z-index
:
999
}
.CostType
._vMG_edit
{
display
:
none
;
position
:
fixed
;
bottom
:
0
;
left
:
180px
;
font-family
:
'PingFangSc-Fine'
;
border-top
:
3px
solid
#38425d
;
background-color
:
#fff
;
padding
:
10px
;
z-index
:
999
}
.CostType
._vMG_edit
._tit
{
padding-left
:
10px
;
border-left
:
3px
solid
#E95252
;
font-size
:
16px
;
color
:
#000000
}
.CostType
._vMG_edit
._tit
span
{
color
:
#666666
;
font-size
:
14px
}
._edHeight
{
height
:
400px
;}
...
...
@@ -139,19 +145,6 @@
</el-select>
</el-form-item>
</el-col>
<!--
<el-col
:span=
"4"
:gutter=
"35"
>
<el-form-item
label=
"适用部门"
>
<el-select
filterable
v-model=
'msg.DepartIDs'
>
<el-option
label=
'不限'
value=
''
></el-option>
<el-option
label=
'通用'
value=
'0'
></el-option>
<el-option
v-for=
'item in departmentList'
:label=
'item.DepartmentName'
:value=
'item.DepartmentID'
:key=
'item.DepartmentID'
>
</el-option>
</el-select>
</el-form-item>
</el-col>
-->
</el-row>
</el-form>
<ul>
...
...
@@ -284,48 +277,12 @@
<span
class=
"_yuan _yuan_red"
v-if=
"item.Type!=1"
></span>
</td>
</
template
>
<!-- <td>{{item.Name}}</td>
<td>{{'层级类型'}}</td>
<td>{{'上级类型'}}</td>
<td>{{'适用公司'}}</td>
<td>{{'适用部门'}}</td>
<td>{{'适用岗位'}}</td>
<td>{{'适用人员'}}</td>
<td>
<span v-if="item.Type===1">收入</span>
<span v-if="item.Type===2">支出</span>
<span v-if="item.Type===3">收支</span>
</td>
<td>
<span class="_yuan" v-if="item.Type==1"></span>
<span class="_yuan _yuan_red" v-if="item.Type!=1"></span>
</td>
<td>
<el-row>
<el-tooltip class="item" effect="dark" content="修改" placement="top-start">
<el-button type="primary" class="iconfont icon-bianji-smal" circle @click="editCurency(item.ID),text='修改'"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-button type="danger" class="iconfont icon-img_delete_small" circle @click="financeinfoRemove(item.ID,item.Name)"></el-button>
</el-tooltip>
</el-row>
</td> -->
</tr>
</tbody>
</table>
<div
class=
"noData"
v-show=
"noData"
>
{{$t('system.content_noData')}}
</div>
<!-- <div>
<el-pagination
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size=msg.pageSize
:total=total>
</el-pagination>
</div> -->
</div>
<div
class=
"_vMG_edit"
:class=
"addShow==true?'edHeight':''"
>
<el-row>
...
...
@@ -367,34 +324,34 @@
</el-col>
<el-col
:span=
"4"
>
<el-form-item
:label=
"$t('fnc.sygongsi') + ':'"
>
<
el-select
filterable
v-model=
'addMsg.BranchId'
>
<!--<el-select filterable v-model='addMsg.BranchId' @change="getDepartmentList()">--
>
<
!-- <el-select filterable v-model='addMsg.BranchId' > --
>
<el-select
filterable
v-model=
'addMsg.BranchId'
@
change=
"getDepartmentList(addMsg.BranchId)"
>
<el-option
:label=
"$t('active.cl_tongyong')"
:value=
'-1'
></el-option>
<el-option
v-for=
'item in companyList'
:label=
'item.
B
Name'
:value=
'item.Id'
:key=
'item.Id'
>
:label=
'item.
S
Name'
:value=
'item.
S
Id'
:key=
'item.
S
Id'
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
:label=
"$t('fnc.sybumen')"
>
<
!--<el-select filterable v-model='addMsg.DepartmentID' @change="getPostList()">--
>
<
el-select
filterable
v-model=
'addMsg.DepartmentID'
>
<
el-select
filterable
v-model=
'addMsg.DepartmentID'
@
change=
"getPostList(addMsg.DepartmentID)"
>
<
!-- <el-select filterable v-model='addMsg.DepartmentID' > --
>
<el-option
:label=
"$t('active.cl_tongyong')"
:value=
'-1'
></el-option>
<el-option
v-for=
'item in DepartmentList'
:label=
'item.Dep
artmen
tName'
:value=
'item.Dep
artmentID
'
:key=
'item.Dep
artmentID
'
>
:label=
'item.DeptName'
:value=
'item.Dep
tId
'
:key=
'item.Dep
tId
'
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
:label=
"$t('fnc.sygangwei') + ':'"
>
<
el-select
filterable
v-model=
'addMsg.PostID'
>
<!--<el-select filterable v-model='addMsg.PostID' @change="getEmployeeList()">--
>
<
!-- <el-select filterable v-model='addMsg.PostID' > --
>
<el-select
filterable
v-model=
'addMsg.PostID'
@
change=
"getEmployeeList(addMsg.PostID)"
>
<el-option
:label=
"$t('active.cl_tongyong')"
:value=
'-1'
></el-option>
<el-option
v-for=
'item in PostList'
:label=
'item.PostName'
...
...
@@ -410,9 +367,9 @@
<el-option
:label=
"$t('active.cl_tongyong')"
:value=
'-1'
></el-option>
<el-option
v-for=
'item in EmployeeList'
:disabled =
'item.disabled'
:label=
'item.EmName'
:value=
'item.
Employee
Id'
:key=
'item.
Employee
Id'
>
:label=
'item.Em
ployee
Name'
:value=
'item.Id'
:key=
'item.Id'
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -469,8 +426,19 @@
</div>
</template>
<
script
>
// import Treeselect from '@riophae/vue-treeselect'
// import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import
{
getSchoolDropdown
}
from
'../../api/school/index'
import
{
queryEmployee
}
from
'../../api/users/user'
import
{
getDeptList
,
}
from
'../../api/system/dept'
//岗位
import
{
getPostList
}
from
'../../api/system/post'
export
default
{
// components: { Treeselect },
data
()
{
...
...
@@ -636,68 +604,73 @@
this
.
initTableInfo
();
this
.
getCostTypeTreeList
();
},
getEmployeeList
(
all
){
//根据公司获、部门、岗位 获取员工
if
(
this
.
addMsg
.
PostID
==-
1
&&
!
all
){
this
.
addMsg
.
EmployeeID
=-
1
;
return
getCompany
(){
//公司
let
schoolMsg
=
{
rowsPerPage
:
12
,
SName
:
""
,
Status
:
'-1'
}
this
.
addMsg
.
EmployeeID
=
''
;
this
.
getEmployeeMsg
.
GroupId
=
all
?
-
1
:
this
.
companyMsg
.
RB_Group_Id
;
this
.
getEmployeeMsg
.
BranchId
=
all
?
-
1
:
this
.
addMsg
.
BranchId
;
this
.
getEmployeeMsg
.
DepartmentId
=
all
?
-
1
:
this
.
addMsg
.
DepartmentID
;
this
.
getEmployeeMsg
.
PostId
=
all
?
-
1
:
this
.
addMsg
.
PostID
;
this
.
apipost
(
'admin_get_EmployeeGetList'
,
this
.
getEmployeeMsg
,
res
=>
{
this
.
EmployeeList
=
res
.
data
.
data
;
},
err
=>
{})
getSchoolDropdown
(
schoolMsg
).
then
(
res
=>
{
this
.
companyList
=
res
.
Data
;
}).
catch
(()
=>
{
})
},
get
PostList
(
all
){
//根据公司获、部门 获取岗位
if
(
this
.
addMsg
.
DepartmentID
==-
1
&&
!
all
)
{
this
.
addMsg
.
PostID
=-
1
;
this
.
addMsg
.
EmployeeID
=-
1
;
return
}
if
(
!
all
)
{
this
.
EmployeeList
=
[];
this
.
EmployeeIDList
=
[];
get
DepartmentList
(
id
){
//根据公司获取 部门
let
msg
=
{
rowsPerPage
:
12
,
DeptName
:
""
,
DeptId
:
0
,
Status
:
"-1"
,
School_Id
:
4
,
DeptTier
:
0
,
ParentId
:
0
}
this
.
addMsg
.
PostID
=
''
;
this
.
addMsg
.
EmployeeID
=
''
;
this
.
getPostMsg
.
RB_Group_Id
=
all
?
-
1
:
this
.
companyMsg
.
RB_Group_Id
;
this
.
getPostMsg
.
RB_Branch_Id
=
all
?
-
1
:
this
.
addMsg
.
BranchId
;
this
.
getPostMsg
.
RB_Department_Id
=
all
?
-
1
:
this
.
addMsg
.
DepartmentID
;
this
.
apipost
(
'admin_get_PostGetList'
,
this
.
getPostMsg
,
res
=>
{
this
.
PostList
=
res
.
data
.
data
;
},
err
=>
{})
msg
.
School_Id
=
id
;
getDeptList
(
msg
).
then
(
res
=>
{
this
.
DepartmentList
=
res
.
Data
;
}).
catch
(()
=>
{
})
},
getDepartmentList
(
all
){
//根据公司获取 部门
if
(
this
.
addMsg
.
BranchId
==-
1
&&
!
all
){
this
.
addMsg
.
DepartmentID
=-
1
;
this
.
addMsg
.
PostID
=-
1
;
this
.
addMsg
.
EmployeeID
=-
1
;
return
}
if
(
!
all
)
{
this
.
EmployeeList
=
[];
this
.
PostList
=
[];
this
.
EmployeeIDList
=
[];
}
this
.
addMsg
.
PostID
=
''
;
this
.
addMsg
.
DepartmentID
=
''
;
this
.
addMsg
.
EmployeeID
=
''
;
this
.
getDepartmentMsg
.
RB_Group_Id
=
all
?
-
1
:
this
.
companyMsg
.
RB_Group_Id
;
this
.
getDepartmentMsg
.
RB_Branch_Id
=
all
?
-
1
:
this
.
addMsg
.
BranchId
;
this
.
apipost
(
'admin_get_DepartmentGetList'
,
this
.
getDepartmentMsg
,
res
=>
{
this
.
DepartmentList
=
res
.
data
.
data
;
},
err
=>
{})
getPostList
(
id
){
//根据公司获、部门 获取岗位
var
postMsg
=
{
RB_Dept_Id
:
id
,
};
getPostList
(
postMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
console
.
log
(
res
,
'岗位'
);
this
.
PostList
=
res
.
Data
;
}
})
},
getCompany
(){
//公司
this
.
EmployeeList
=
[];
this
.
PostList
=
[];
this
.
DepartmentList
=
[];
this
.
apipost
(
'admin_get_BranchGetList'
,
this
.
companyMsg
,
res
=>
{
this
.
companyList
=
res
.
data
.
data
;
},
err
=>
{})
getEmployeeList
(
id
){
//根据公司获、部门、岗位 获取员工
var
qMsg
=
{
Post_Id
:
0
}
qMsg
.
Dept_Id
=
id
;
queryEmployee
(
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
){
console
.
log
(
res
,
'员工'
);
this
.
EmployeeList
=
res
.
Data
;
}
}).
catch
(()
=>
{
})
// if(this.addMsg.PostID==-1 && !all){
// this.addMsg.EmployeeID=-1;
// return
// }
// this.addMsg.EmployeeID = '';
// this.getEmployeeMsg.GroupId = all ? -1 : this.companyMsg.RB_Group_Id;
// this.getEmployeeMsg.BranchId = all ? -1 : this.addMsg.BranchId;
// this.getEmployeeMsg.DepartmentId = all ? -1 : this.addMsg.DepartmentID;
// this.getEmployeeMsg.PostId = all ? -1 : this.addMsg.PostID;
// this.apipost('admin_get_EmployeeGetList',this.getEmployeeMsg, res => {
// this.EmployeeList = res.data.data;
// }, err => {})
},
getCostTypeList
(
t
,
x
){
if
(
!
x
){
this
.
addMsg
.
ParentId
=
''
;
...
...
@@ -819,6 +792,7 @@
let
Type1
=
false
,
Type2
=
false
,
Type3
=
false
;
console
.
log
(
data
,
'data'
);
if
(
data
.
DepartList
&&
data
.
DepartList
.
length
>
0
){
this
.
EmployeeIDList
=
[];
data
.
DepartList
.
forEach
(
x
=>
{
...
...
@@ -857,11 +831,11 @@
});
}
if
(
!
Type1
&&
!
Type2
&&
!
Type3
)
{
this
.
getEmployeeList
(
'all'
);
this
.
getDepartmentList
(
'all'
);
this
.
getPostList
(
'all'
);
this
.
getEmployeeList
(
0
);
this
.
getDepartmentList
(
0
);
this
.
getPostList
(
0
);
}
else
{
this
.
getEmployeeList
()
this
.
getEmployeeList
(
0
)
}
data
.
list
=
[];
data
.
IsShareAccount
=
data
.
IsShareAccount
;
...
...
@@ -935,10 +909,13 @@
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addShow
=
true
;
var
dataList
=
res
.
data
.
data
;
this
.
getPostList
();
this
.
getDepartmentList
();
this
.
getEmployeeList
(
'all'
);
this
.
getPostList
(
'all'
);
// this.getDepartmentList();
// this.getEmployeeList('all');
// this.getPostList('all');
this
.
getDepartmentList
(
0
);
this
.
getPostList
(
0
);
this
.
getEmployeeList
(
0
);
this
.
EmployeeIDList
=
[];
this
.
addMsg
.
ID
=
dataList
.
ID
;
this
.
addMsg
.
Name
=
dataList
.
Name
;
...
...
@@ -1042,14 +1019,6 @@
this
.
addMsg
.
list
.
push
(
obj
)
});
}
// if(this.addMsg.EmployeeID&&this.addMsg.EmployeeID!=-1){
// let obj = {
// ID:0,
// Type:4,
// departmentId:this.addMsg.EmployeeID
// }
// this.addMsg.list.push(obj)
// }
if
(
this
.
EmployeeIDList
[
0
]
===-
1
&&
this
.
addMsg
.
DepartmentID
===-
1
&&
this
.
addMsg
.
PostID
===-
1
&&
this
.
addMsg
.
BranchId
===-
1
){
let
obj
=
{
ID
:
0
,
...
...
@@ -1092,9 +1061,9 @@
});
},
addFun
:
function
()
{
this
.
getDepartmentList
(
'all'
);
this
.
getPostList
(
'all'
);
this
.
getEmployeeList
(
'all'
);
// this.getDepartmentList(0
);
// this.getPostList(0
);
// this.getEmployeeList(0
);
this
.
EmployeeIDList
=
[];
this
.
EmployeeIDList
.
push
(
-
1
);
}
...
...
@@ -1104,12 +1073,11 @@
let
userInfo
=
this
.
getLocalStorage
();
this
.
departmentMsg
.
RB_Group_Id
=
this
.
companyMsg
.
RB_Group_Id
=
userInfo
.
RB_Group_id
;
//集团
this
.
msg
.
EmployeeID
=
userInfo
.
EmployeeId
;
this
.
getDepartment
();
this
.
getCompany
();
this
.
getDepartmentList
(
0
);
this
.
getPostList
(
0
);
this
.
getEmployeeList
(
0
);
this
.
getCostTypeTreeList
();
this
.
getDepartmentList
(
'all'
);
this
.
getPostList
(
'all'
);
this
.
getEmployeeList
(
'all'
);
}
}
...
...
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