Commit 8b09cb89 authored by zhengke's avatar zhengke

增加修改

parent 62de6f87
...@@ -98,6 +98,17 @@ ...@@ -98,6 +98,17 @@
color: red; color: red;
display: none; display: none;
} }
.ct_Edit{
position: absolute;
right:10px;
top:5px;
color:#fff;
cursor: pointer;
z-index:999;
}
.ct_Edit:hover{
color:#E95252;
}
</style> </style>
<template> <template>
<div class="flexOne CostType"> <div class="flexOne CostType">
...@@ -146,7 +157,7 @@ ...@@ -146,7 +157,7 @@
<button class="hollowFixedBtn" @click="resetPageIndex(),initTableInfo()">{{$t('pub.searchBtn')}}</button> <button class="hollowFixedBtn" @click="resetPageIndex(),initTableInfo()">{{$t('pub.searchBtn')}}</button>
<!-- <button type="button" class="normalBtn" @click="outerVisible=true">导入</button> <!-- <button type="button" class="normalBtn" @click="outerVisible=true">导入</button>
<button type="button" class="normalBtn" @click="downMuban()">下载导入模板</button> --> <button type="button" class="normalBtn" @click="downMuban()">下载导入模板</button> -->
<button class="normalBtn" @click="addShow=true,text=$t('pub.addBtn'),addFun()" >{{$t('pub.addBtn')}}</button> <button class="normalBtn" @click="addShow=true,text=$t('pub.addBtn'),addFun(),resetInfo()" >{{$t('pub.addBtn')}}</button>
<el-tooltip class="item" effect="dark" :content="$t('fnc.qhpaiban')" placement="top-end"> <el-tooltip class="item" effect="dark" :content="$t('fnc.qhpaiban')" placement="top-end">
<i v-if="transitionShow" class="iconfont icon-biaoge" @click="switchMethod(1)"></i> <i v-if="transitionShow" class="iconfont icon-biaoge" @click="switchMethod(1)"></i>
<i v-if="transitionShow2" class="iconfont icon-icon-ssan" @click="switchMethod(2)"></i> <i v-if="transitionShow2" class="iconfont icon-icon-ssan" @click="switchMethod(2)"></i>
...@@ -174,6 +185,9 @@ ...@@ -174,6 +185,9 @@
</p> </p>
</div> </div>
</div> </div>
<div class="ct_Edit" @click="getEditInfo(item.ID)">
<i class="iconfont icon-xiugai"></i>
</div>
</div> </div>
</div> </div>
<table class="po_content singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0" v-if="transitionShow" > <table class="po_content singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0" v-if="transitionShow" >
...@@ -345,7 +359,7 @@ ...@@ -345,7 +359,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="$t('fnc.table_rank')+':'"> <el-form-item :label="$t('system.table_rank')+':'">
<el-input v-model="addMsg.Sort"></el-input> <el-input v-model="addMsg.Sort"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -363,7 +377,7 @@ ...@@ -363,7 +377,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="$t('fnc.sybumen') + ':'"> <el-form-item :label="$t('fnc.sybumen')">
<!--<el-select filterable v-model='addMsg.DepartmentID' @change="getPostList()">--> <!--<el-select filterable v-model='addMsg.DepartmentID' @change="getPostList()">-->
<el-select filterable v-model='addMsg.DepartmentID' > <el-select filterable v-model='addMsg.DepartmentID' >
<el-option :label="$t('active.cl_tongyong')" :value='-1'></el-option> <el-option :label="$t('active.cl_tongyong')" :value='-1'></el-option>
...@@ -904,6 +918,71 @@ ...@@ -904,6 +918,71 @@
this.msg.pageIndex=1; this.msg.pageIndex=1;
this.currentPage = 1 this.currentPage = 1
}, },
//点击修改
getEditInfo(ID){
let msg = {
ID:ID
}
this.apipost('financeinfo_post_GetCostType',msg, res => {
if(res.data.resultCode == 1) {
this.addShow=true;
var dataList = res.data.data;
this.getPostList();
this.getDepartmentList();
this.getEmployeeList('all');
this.getPostList('all');
this.addMsg = dataList;
this.EmployeeIDList=[];
if(dataList.DepartList.length>0){
dataList.DepartList.forEach(x=>{
if(x.ID==dataList.ID){
switch(x.Type){
case 1:
this.addMsg.BranchId = x.departmentId;
break;
case 2:
this.addMsg.PostID = x.departmentId;
break;
case 3:
this.addMsg.DepartmentID = x.departmentId;
break;
case 4:
this.addMsg.EmployeeID = x.departmentId;
break;
case 5:
this.addMsg.BranchId = -1;
this.addMsg.PostID = -1;
this.addMsg.DepartmentID = -1;
this.addMsg.EmployeeID = -1;
this.EmployeeIDList.push(-1);
}
}
})
}
} else {
this.Error(res.data.message);
}
}, err => {})
},
//重置表单
resetInfo(){
var msg = {
ID:0,
Name:'',
Type:1, // 1收 2支 3收支
Tier:1,
ParentId:'',
IsShareAccount:0,
Sort:'0',
BranchId:-1,
PostID:-1,
DepartmentID:-1,
EmployeeID: -1,
list:[],
Is_Report:0
}
this.addMsg = msg;
},
addFlightmodule(){//添加 addFlightmodule(){//添加
this.addMsg.list = []; this.addMsg.list = [];
if(this.addMsg.Tier===1){ if(this.addMsg.Tier===1){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment