|
@@ -385,24 +385,26 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
- <!-- -------------- -->
|
|
|
|
|
|
+ <!-- --------- -->
|
|
<div v-if="displayTable && apk && apk2 == 6" class="tops">
|
|
<div v-if="displayTable && apk && apk2 == 6" class="tops">
|
|
<div class="ctons">
|
|
<div class="ctons">
|
|
<div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
|
|
<div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
|
|
<div style="display: inline-block;width: 350px">
|
|
<div style="display: inline-block;width: 350px">
|
|
- <el-input style="float:left;" v-model="keywordAl" class="input-with-select" placeholder="请输入人员搜索" clearable="true" size="small">
|
|
|
|
|
|
+ <el-input style="float:left;" v-model="keywordAl" class="input-with-select" placeholder="请输入人员姓名搜索" clearable="true" size="small">
|
|
<el-button slot="append" @click="searchAl()" icon="el-icon-search"></el-button>
|
|
<el-button slot="append" @click="searchAl()" icon="el-icon-search"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
<div style="display: inline-block;width: 340px;margin-left:100px">
|
|
<div style="display: inline-block;width: 340px;margin-left:100px">
|
|
<span style="display: inline-block;margin: 0 15px 0 20px;color: rgb(96, 98, 102);">按部门筛选</span>
|
|
<span style="display: inline-block;margin: 0 15px 0 20px;color: rgb(96, 98, 102);">按部门筛选</span>
|
|
<el-cascader
|
|
<el-cascader
|
|
|
|
+ ref="selectAl"
|
|
filterable
|
|
filterable
|
|
v-model="NcurDeptId"
|
|
v-model="NcurDeptId"
|
|
- placeholder="请选择部门/指定人员"
|
|
|
|
|
|
+ placeholder="请选择部门"
|
|
size="small"
|
|
size="small"
|
|
style="width: 50%"
|
|
style="width: 50%"
|
|
- @change="chooseDept"
|
|
|
|
|
|
+ @change="selAl()"
|
|
|
|
+ clearable
|
|
:options="Nsdata"
|
|
:options="Nsdata"
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover' }"
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover' }"
|
|
:show-all-levels="false">
|
|
:show-all-levels="false">
|
|
@@ -411,52 +413,52 @@
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<el-table v-loading="loading" :data="iAlDataS" height="780px" style="width: 100%">
|
|
<el-table v-loading="loading" :data="iAlDataS" height="780px" style="width: 100%">
|
|
- <el-table-column prop="name" label="姓名" width="200">
|
|
|
|
|
|
+ <el-table-column prop="userName" label="姓名" width="200">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <div v-if="scope.row.name">
|
|
|
|
- {{scope.row.name}}
|
|
|
|
|
|
+ <div v-if="scope.row.userName">
|
|
|
|
+ {{scope.row.userName}}
|
|
</div>
|
|
</div>
|
|
<div v-else>
|
|
<div v-else>
|
|
<span>暂无请假统计</span>
|
|
<span>暂无请假统计</span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="Dpm" label="所在部门" width="200">
|
|
|
|
|
|
+ <el-table-column prop="department" label="所在部门" width="200">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{scope.row.Dpm}}
|
|
|
|
|
|
+ {{scope.row.department}}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="AltimeAll" label="每年年假天数" width="200">
|
|
|
|
|
|
+ <el-table-column prop="yearDays" label="每年年假天数" width="200">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{scope.row.AltimeAll}}天
|
|
|
|
|
|
+ {{scope.row.yearDays != null ? scope.row.yearDays + "天" : "-"}}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="AltimeAlr" label="剩余年假天数" width="200">
|
|
|
|
|
|
+ <el-table-column prop="leftdays" label="剩余年假天数" width="200">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{scope.row.AltimeAll - scope.row.AltimeAlr}}天
|
|
|
|
|
|
+ {{scope.row.yearDays != null ? scope.row.yearDays - scope.row.alreadyDays + "天" : "-"}}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="id" label="设置">
|
|
|
|
|
|
+ <el-table-column prop="id" label="修改年假天数">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button size="small" @click="changeAltime(scope.row.id)">设置</el-button>
|
|
|
|
|
|
+ <el-button size="small" @click="changeAltime(scope.row)">设置</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<el-dialog title="请设置年假时限" v-if="Alshow" :visible.sync="Alshow" width="500px">
|
|
<el-dialog title="请设置年假时限" v-if="Alshow" :visible.sync="Alshow" width="500px">
|
|
- <el-form label-width="100px">
|
|
|
|
|
|
+ <el-form label-width="120px">
|
|
<el-form-item label="设置总年假天数" >
|
|
<el-form-item label="设置总年假天数" >
|
|
- <el-input v-model="Alchange" type="number" placeholder="请输入天数"></el-input>
|
|
|
|
|
|
+ <el-input v-model="Alchange.yearDays" type="number" min="0" placeholder="请输入天数"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
- <el-button type="default" @click="delAltime" v-if="!isAdd" style="float:left;">取消</el-button>
|
|
|
|
- <el-button type="primary" @click="chgAltime" >确定</el-button>
|
|
|
|
|
|
+ <el-button type="default" @click="delAltime()">取消</el-button>
|
|
|
|
+ <el-button type="primary" @click="chgAltime()">确定</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
-<!-- ------------------- -->
|
|
|
|
|
|
+<!-- --------- -->
|
|
</div>
|
|
</div>
|
|
<!-- 请假单详情 -->
|
|
<!-- 请假单详情 -->
|
|
<el-dialog title="请假单详情" :visible.sync="dialog" width="1000px" @close="bangd()">
|
|
<el-dialog title="请假单详情" :visible.sync="dialog" width="1000px" @close="bangd()">
|
|
@@ -675,20 +677,16 @@ export default {
|
|
soption : null,
|
|
soption : null,
|
|
|
|
|
|
Alshow: false,
|
|
Alshow: false,
|
|
- Alchange: '',
|
|
|
|
|
|
+ Alchange: null,
|
|
susers: [],
|
|
susers: [],
|
|
keywordAl: '',
|
|
keywordAl: '',
|
|
- NcurDeptId:null,
|
|
|
|
|
|
+ NcurDeptId:[],
|
|
Nsdata : [],
|
|
Nsdata : [],
|
|
AlData : [],
|
|
AlData : [],
|
|
iAlDataS: [],
|
|
iAlDataS: [],
|
|
- iAlData : [
|
|
|
|
- {name: "杨峰", id: "7913998191517310976", Dpm:"软件开发部", AltimeAll: 2, AltimeAlr: 1},
|
|
|
|
- {name: "赵四", id: "123456789", Dpm:"美术中心", AltimeAll: 3, AltimeAlr: 1},
|
|
|
|
- {name: "刘能", id: "987654321", Dpm:"策划部", AltimeAll: 3, AltimeAlr: 2},
|
|
|
|
- ]
|
|
|
|
|
|
+ iAlData : []
|
|
|
|
|
|
- // ------------------
|
|
|
|
|
|
+ // ---------
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
@@ -709,9 +707,10 @@ export default {
|
|
},
|
|
},
|
|
filters: {},
|
|
filters: {},
|
|
methods: {
|
|
methods: {
|
|
- changeAltime(id){
|
|
|
|
|
|
+ changeAltime(e){
|
|
this.Alshow = true
|
|
this.Alshow = true
|
|
- console.log("id",id);
|
|
|
|
|
|
+ this.Alchange = JSON.parse(JSON.stringify(e))
|
|
|
|
+ console.log("设置",this.Alchange);
|
|
},
|
|
},
|
|
searchAl(){
|
|
searchAl(){
|
|
this.iAlDataS = []
|
|
this.iAlDataS = []
|
|
@@ -722,21 +721,70 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
delAltime(){
|
|
delAltime(){
|
|
-
|
|
|
|
|
|
+ this.Alshow = false
|
|
|
|
+ this.Alchange = null
|
|
},
|
|
},
|
|
chgAltime(){
|
|
chgAltime(){
|
|
-
|
|
|
|
|
|
+ this.http.post('/user-yearleave-setting/save',{userId: this.Alchange.userId, companyId: this.user.companyId, yearDays: this.Alchange.yearDays},
|
|
|
|
+ res => {
|
|
|
|
+ if(res.code == "ok"){
|
|
|
|
+ this.Alshow = false,
|
|
|
|
+ this.getAl()
|
|
|
|
+ }else{
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "error"
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ this.Alshow = false
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ )
|
|
},
|
|
},
|
|
getAl(){
|
|
getAl(){
|
|
this.http.get('/user-yearleave-setting/list',
|
|
this.http.get('/user-yearleave-setting/list',
|
|
res => {
|
|
res => {
|
|
if(res.code == "ok"){
|
|
if(res.code == "ok"){
|
|
this.iAlData = res.data
|
|
this.iAlData = res.data
|
|
|
|
+ this.iAlDataS = this.iAlData
|
|
|
|
+ if(this.apk2 == 6){
|
|
|
|
+ this.selAl()
|
|
|
|
+ }
|
|
console.log("getAl",res.data);
|
|
console.log("getAl",res.data);
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "error"
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ this.Alshow = false
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ })
|
|
}
|
|
}
|
|
)
|
|
)
|
|
},
|
|
},
|
|
|
|
+ selAl(){
|
|
|
|
+ let e = this.$refs.selectAl.getCheckedNodes()[0]
|
|
|
|
+ if(e == undefined){
|
|
|
|
+ this.iAlDataS = this.iAlData
|
|
|
|
+ }else{
|
|
|
|
+ this.iAlDataS = []
|
|
|
|
+ for (let i = 0; i < this.iAlData.length; i++) {
|
|
|
|
+ if (e.label == this.iAlData[i].department) {
|
|
|
|
+ this.iAlDataS.push(this.iAlData[i])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// ---------
|
|
// ---------
|
|
|
|
|
|
handleNodeClick(data) {
|
|
handleNodeClick(data) {
|
|
@@ -782,7 +830,7 @@ export default {
|
|
{value: 2 , label : "指定人员",children : this.susers}
|
|
{value: 2 , label : "指定人员",children : this.susers}
|
|
]
|
|
]
|
|
this.Nsdata = list1
|
|
this.Nsdata = list1
|
|
- // console.log("列表",this.Nsdata);
|
|
|
|
|
|
+ console.log("列表",this.Nsdata);
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -981,7 +1029,7 @@ export default {
|
|
this.addForm.leaveType = index
|
|
this.addForm.leaveType = index
|
|
},
|
|
},
|
|
staffs(key, keyPath) {
|
|
staffs(key, keyPath) {
|
|
- // console.log("keypath",keyPath)
|
|
|
|
|
|
+ console.log("keypath",keyPath)
|
|
if (keyPath[0] == '1') {
|
|
if (keyPath[0] == '1') {
|
|
this.displayTable = false;
|
|
this.displayTable = false;
|
|
this.apk = false
|
|
this.apk = false
|
|
@@ -999,11 +1047,11 @@ export default {
|
|
this.apk = true
|
|
this.apk = true
|
|
this.statistical()
|
|
this.statistical()
|
|
} else {
|
|
} else {
|
|
|
|
+ this.NcurDeptId = []
|
|
this.displayTable = true;
|
|
this.displayTable = true;
|
|
this.apk2 = 6
|
|
this.apk2 = 6
|
|
this.apk = true
|
|
this.apk = true
|
|
- this.iAlDataS = this.iAlData
|
|
|
|
- this.statistical()
|
|
|
|
|
|
+ this.getAl()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
bills(audit, tr){
|
|
bills(audit, tr){
|