|
|
@@ -15,7 +15,7 @@
|
|
|
size="small"
|
|
|
icon="el-icon-delete"
|
|
|
plain
|
|
|
- @click="handleDelete"
|
|
|
+ @click="handleClearAttendance"
|
|
|
>
|
|
|
清除考勤数据
|
|
|
</el-button>
|
|
|
@@ -37,6 +37,23 @@
|
|
|
>
|
|
|
导出
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ @click="handleImportYfPerson"
|
|
|
+ >
|
|
|
+ 引用当月研发人员名单
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ plain
|
|
|
+ @click="handleDelete"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
<print-table-btn @click="printTable" />
|
|
|
|
|
|
</template>
|
|
|
@@ -176,6 +193,22 @@ export default window.$crudCommon({
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleImportYfPerson() {
|
|
|
+ this.$confirm("确认引用单月研发人员名单吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.api.feachProjectPersonList({ yearAndMonth: this.params.yearAndMonth}).then(res => {
|
|
|
+ let data = res.data;
|
|
|
+ if (data.success) {
|
|
|
+ this.$message.success('引用成功!');
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.getList(this.page);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
refreshTableCol(yearAndMonth) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
@@ -281,7 +314,24 @@ export default window.$crudCommon({
|
|
|
return {
|
|
|
color
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleClearAttendance() {
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
+ this.$message.warning("请选择至少一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm("确认要清除考勤数据吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.api.clearAttendance(this.getBatchDelParams()).then((data) => {
|
|
|
+ this.getList();
|
|
|
+ this.$message.success('清除成功');
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
}, {
|
|
|
// 模块路径
|