Commit 47ce4bfd authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents a92bc044 18f4ff4a
...@@ -12,10 +12,8 @@ ...@@ -12,10 +12,8 @@
:model="form" :model="form"
:rules="rules" :rules="rules"
label-width="120px" label-width="120px"
style="width: 100%;" style="width: 100%"
> >
<div class="cell2"> <div class="cell2">
<div class="history"> <div class="history">
<span>姓名:</span> <span>姓名:</span>
...@@ -57,12 +55,24 @@ ...@@ -57,12 +55,24 @@
<span>手机号:</span> <span>手机号:</span>
<span class="times">{{ form.phoneNumber }}</span> <span class="times">{{ form.phoneNumber }}</span>
</div> </div>
<div class="history">
<span>绩效展示:</span>
<el-switch
:active-value="1"
:inactive-value="0"
v-model="form.otherCheck"
@change="handleSwitch(1)"
>
</el-switch>
</div>
<div class="box" v-if="form.otherCheck == 1">
<div class="history"> <div class="history">
<span>考勤授权:</span> <span>考勤授权:</span>
<el-switch <el-switch
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
v-model="form.attendCheck" v-model="form.attendCheck"
@change="handleSwitch(2)"
> >
</el-switch> </el-switch>
</div> </div>
...@@ -71,7 +81,8 @@ ...@@ -71,7 +81,8 @@
<el-switch <el-switch
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
v-model="form.complainCheck" v-model="form.reviewCheck"
@change="handleSwitch(2)"
> >
</el-switch> </el-switch>
</div> </div>
...@@ -90,6 +101,7 @@ ...@@ -90,6 +101,7 @@
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
v-model="form.goworkCheck" v-model="form.goworkCheck"
@change="handleSwitch(2)"
> >
</el-switch> </el-switch>
</div> </div>
...@@ -99,6 +111,7 @@ ...@@ -99,6 +111,7 @@
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
v-model="form.effectCheck" v-model="form.effectCheck"
@change="handleSwitch(2)"
> >
</el-switch> </el-switch>
</div> </div>
...@@ -107,29 +120,21 @@ ...@@ -107,29 +120,21 @@
<el-switch <el-switch
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
v-model="form.otherCheck" v-model="form.complainCheck"
@change="handleSwitch(2)"
> >
</el-switch> </el-switch>
</div> </div>
</div> </div>
</div>
<el-row> <el-row> </el-row>
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
:enumData="dict.deptId"
type="select"
placeholder="请选择所属部门"
/>
</el-row>
<form-buttons <form-buttons
@submit="submitForm" @submit="submitForm"
noCancelBtn noCancelBtn
style="position: absolute; left: -100px;" v-if="title != '考核授权'"
style="position: absolute; left: -100px"
/> />
</el-form> </el-form>
</el-drawer> </el-drawer>
...@@ -216,7 +221,44 @@ export default { ...@@ -216,7 +221,44 @@ export default {
}, },
methods: { methods: {
renderContent: function(h, { node, data, store }) { handleSwitch(i) {
let obj = {};
if (i == 1) {
if (this.form.otherCheck == 0) {
this.form.attendCheck = 0;
this.form.reviewCheck = 0;
this.form.goworkCheck = 0;
this.form.effectCheck = 0;
this.form.complainCheck = 0;
} else {
this.form.attendCheck = 1;
this.form.reviewCheck = 1;
this.form.goworkCheck = 1;
this.form.effectCheck = 1;
this.form.complainCheck = 1;
}
}
obj = {
otherCheck: this.form.otherCheck,
attendCheck: this.form.attendCheck,
reviewCheck: this.form.reviewCheck,
goworkCheck: this.form.goworkCheck,
effectCheck: this.form.effectCheck,
complainCheck: this.form.complainCheck,
};
obj.staffId = this.form.id;
this.form.staffId = this.form.id;
this.form.type = 1;
this.$post("/staff/check/authorize", obj).then((res) => {
if (res.code == 1) {
this.$message.success("绩效展示修改成功!");
} else {
this.$message.error(res.message);
}
});
},
renderContent: function (h, { node, data, store }) {
return ( return (
<span> <span>
<i style="font-size:16px;color:#409EFF" class={data.icon}></i> <i style="font-size:16px;color:#409EFF" class={data.icon}></i>
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
></tab-pane> ></tab-pane>
</div> </div>
<el-row :gutter="20" style="padding-top: 10px;"> <el-row :gutter="20" style="padding-top: 10px">
<el-col :span="6" :xs="12" class="mytree"> <el-col :span="6" :xs="12" class="mytree">
<div class="titles">选择部门</div> <div class="titles">选择部门</div>
<!-- default-expand-all --> <!-- default-expand-all -->
<el-scrollbar style="height:630px;overflow-y: auto;"> <el-scrollbar style="height: 630px; overflow-y: auto">
<el-tree <el-tree
size="mini" size="mini"
ref="siteTree" ref="siteTree"
...@@ -54,13 +54,13 @@ ...@@ -54,13 +54,13 @@
:disabled="ishowBumen" :disabled="ishowBumen"
size="mini" size="mini"
slot="table-head-left2" slot="table-head-left2"
>部门分配</el-button> >部门分配</el-button
>
<el-dropdown <el-dropdown
class="moreControll" class="moreControll"
slot="table-head-left2" slot="table-head-left2"
style="margin-left:20px" style="margin-left: 20px"
> >
<el-button type="primary" size="mini"> <el-button type="primary" size="mini">
更多操作<i class="el-icon-arrow-down el-icon--right"></i> 更多操作<i class="el-icon-arrow-down el-icon--right"></i>
...@@ -152,9 +152,7 @@ ...@@ -152,9 +152,7 @@
<div>花名册记录</div> <div>花名册记录</div>
<!-- <el-button type="text">查看</el-button> --> <!-- <el-button type="text">查看</el-button> -->
</div> </div>
<div class="times"> <div class="times">导出时间:2023-07-19</div>
导出时间:2023-07-19
</div>
</div> </div>
</div> </div>
</el-drawer> </el-drawer>
...@@ -172,7 +170,7 @@ ...@@ -172,7 +170,7 @@
> >
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div class="mt20" style="text-align:right"> <div class="mt20" style="text-align: right">
<el-button @click="() => (isdialog = falsle)">取消</el-button> <el-button @click="() => (isdialog = falsle)">取消</el-button>
<el-button type="primary" @click="handleOk">确定</el-button> <el-button type="primary" @click="handleOk">确定</el-button>
</div> </div>
...@@ -187,23 +185,23 @@ ...@@ -187,23 +185,23 @@
<!-- 部门选择 --> <!-- 部门选择 -->
<el-dialog :visible.sync="ishowBumen" title="员工分配部门" width="70%"> <el-dialog :visible.sync="ishowBumen" title="员工分配部门" width="70%">
<el-form ref="form" label-width="80px"> <el-form ref="form" label-width="80px">
<el-row type="flex" > <el-row type="flex">
<el-form-item label="员工"> <el-form-item label="员工">
<el-tag style="margin-left: 10px" v-for="tag in staffTags"> <el-tag style="margin-left: 10px" v-for="tag in staffTags">
{{tag}} {{ tag }}
</el-tag> </el-tag>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-form-item label="分配部门"> <el-form-item label="分配部门">
<el-tag style="margin-left: 10px" v-if="disdept!=''" > <el-tag style="margin-left: 10px" v-if="disdept != ''">
{{disdept}} {{ disdept }}
</el-tag> </el-tag>
</el-form-item> </el-form-item>
<el-divider></el-divider> <el-divider></el-divider>
<el-row type="flex" :gutter="20" style="height:60vh"> <el-row type="flex" :gutter="20" style="height: 60vh">
<el-col :span="24" :xs="12" class="mytree"> <el-col :span="24" :xs="12" class="mytree">
<el-scrollbar style="height: 100%;width: 100%"> <el-scrollbar style="height: 100%; width: 100%">
<el-tree <el-tree
size="mini" size="mini"
ref="deptTree" ref="deptTree"
...@@ -224,12 +222,13 @@ ...@@ -224,12 +222,13 @@
</el-col> </el-col>
</el-row> </el-row>
<div class="mt20"> <div class="mt20">
<el-button type="primary" size="mini" @click="comfirmDept">确定</el-button> <el-button type="primary" size="mini" @click="comfirmDept"
>确定</el-button
>
<el-button size="mini" @click="ishowBumen = false">取消</el-button> <el-button size="mini" @click="ishowBumen = false">取消</el-button>
</div> </div>
</el-form> </el-form>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -260,7 +259,7 @@ export default { ...@@ -260,7 +259,7 @@ export default {
<i style="font-size:16px;color:#409EFF" class={data.icon}></i> <i style="font-size:16px;color:#409EFF" class={data.icon}></i>
<span style="padding-left: 2px;font-size:14px">{node.label}</span> <span style="padding-left: 2px;font-size:14px">{node.label}</span>
</span> </span>
) );
}, },
handleOk() { handleOk() {
this.config.columns.forEach((v) => { this.config.columns.forEach((v) => {
...@@ -296,21 +295,20 @@ export default { ...@@ -296,21 +295,20 @@ export default {
}); });
}, },
async assignStaffToDept(){ async assignStaffToDept() {
if(this.selection.length==0){ if (this.selection.length == 0) {
this.$message.info("请选择需要分配部门的员工!"); this.$message.info("请选择需要分配部门的员工!");
return return;
} }
await this.$post(`/staff/list`, { await this.$post(`/staff/list`, {
page: 1, page: 1,
size: -1, size: -1,
idList:this.selection idList: this.selection,
}).then((res) => { }).then((res) => {
this.staffTags = res.data.data.map((i) => i.name);
this.staffTags= res.data.data.map(i=>i.name) this.disdept = "";
this.disdept='' this.disdeptId = null;
this.disdeptId=null this.ishowBumen = true;
this.ishowBumen=true;
}); });
}, },
...@@ -327,44 +325,42 @@ export default { ...@@ -327,44 +325,42 @@ export default {
}); });
}, },
handleDeptSelectClick(obj){ handleDeptSelectClick(obj) {
this.disdept=obj.label this.disdept = obj.label;
this.disdeptId=obj.id this.disdeptId = obj.id;
}, },
comfirmDept(){ comfirmDept() {
if(this.disdept==''){ if (this.disdept == "") {
this.$message.warning("请选择对应的部门!") this.$message.warning("请选择对应的部门!");
return; return;
} }
let updateStaffList=this.selection.map(id=>{ let updateStaffList = this.selection.map((id) => {
let obj={} let obj = {};
obj.id=id obj.id = id;
obj.deptId=this.disdeptId obj.deptId = this.disdeptId;
obj.deptName=this.disdept obj.deptName = this.disdept;
return obj return obj;
}) });
if(updateStaffList.length==0){ if (updateStaffList.length == 0) {
this.$message.warning("请选择员工与对应的部门!") this.$message.warning("请选择员工与对应的部门!");
return; return;
} }
console.log(updateStaffList) console.log(updateStaffList);
this.$post('staff/batchSave',updateStaffList).then(res => { this.$post("staff/batchSave", updateStaffList).then((res) => {
if(res.code == 1){ if (res.code == 1) {
this.ishowBumen=false; this.ishowBumen = false;
this.$message.success("员工分配部门成功!") this.$message.success("员工分配部门成功!");
this.getData(); this.getData();
}else{ } else {
this.$message.error(res.msg) this.$message.error(res.msg);
} }
}) });
}, },
/** 重写新增方法 */ /** 重写新增方法 */
toAdd(row) { toAdd(row) {
this.$refs.drawerform.add(row); this.$refs.drawerform.add(row);
...@@ -455,9 +451,9 @@ export default { ...@@ -455,9 +451,9 @@ export default {
disdept: "", disdept: "",
disdeptId: "", disdeptId: "",
staffTags: [], staffTags: [],
ishowBumen:false, ishowBumen: false,
staffList:[], staffList: [],
deptnode:{}, deptnode: {},
// 用户导入参数 // 用户导入参数
upload: { upload: {
headers: { headers: {
...@@ -544,7 +540,7 @@ export default { ...@@ -544,7 +540,7 @@ export default {
noAdd noAdd
noAuth noAuth
noDel noDel
noEdit
row={row} row={row}
onView={this.toView} onView={this.toView}
onEdit={this.toEdit} onEdit={this.toEdit}
......
...@@ -403,6 +403,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -403,6 +403,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
} }
//this.dao.update(temp); //this.dao.update(temp);
temp.setStaffName(staffName); temp.setStaffName(staffName);
temp.setUpdateTime(new Date());
updateList.add(temp); updateList.add(temp);
} }
String attendanceSummary = ""; String attendanceSummary = "";
...@@ -612,6 +613,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc ...@@ -612,6 +613,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
} }
//this.dao.update(temp); //this.dao.update(temp);
temp.setStaffName(staffName); temp.setStaffName(staffName);
temp.setUpdateTime(new Date());
updateList.add(temp); updateList.add(temp);
} }
......
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