diff --git a/ruoyi-ui/src/views/pay/attendance/index.vue b/ruoyi-ui/src/views/pay/attendance/index.vue
index ffe5a39..4a47103 100644
--- a/ruoyi-ui/src/views/pay/attendance/index.vue
+++ b/ruoyi-ui/src/views/pay/attendance/index.vue
@@ -66,7 +66,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['pay:attendance:add']"
- >新增
+ >新增
+
修改
+ >修改
+
删除
+ >删除
+
+
+
+ 导入
+
-
导出
+ >导出
+
@@ -174,32 +179,26 @@
-
+
-
-
-
-
+
+
+
-
-
+
+
-
@@ -207,7 +206,7 @@
-
-
-
-
-
-
-
+
-
+
-
+
-
+
@@ -248,6 +242,56 @@
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import { listAttendance, getAttendance, delAttendance, addAttendance, updateAttendance } from "@/api/pay/attendance";
import { listEmployeeInfo } from "@/api/pay/employeeInfo";
-import { deptTreeSelect } from "@/api/system/user";
import { listTenant } from "@/api/pay/tenant";
import { getToken } from "@/utils/auth";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Attendance",
- components: { Treeselect },
+ dicts: ['sys_user_sex', 'pay_del_status'],
data() {
return {
// 公司信息
@@ -343,8 +384,6 @@ export default {
title: "",
// 是否显示弹出层
open: false,
- // 部门树选项
- deptOptions: undefined,
// 员工列表
employeeList: [],
// 查询参数
@@ -394,7 +433,7 @@ export default {
// 设置上传的请求头部
headers: { Authorization: "Bearer " + getToken() },
// 上传的地址
- url: process.env.VUE_APP_BASE_API + "/secure/attendance/importData",
+ url: process.env.VUE_APP_BASE_API + "/pay/attendance/import",
date: "",
options: [{
kaoqinType: '0',
@@ -406,16 +445,35 @@ export default {
kaoqinType: '2',
facilities: '围栏'
}],
- kaoqinType: ''
+ kaoqinType: '',
+ tenantId: '',
+ },
+ /** 选择员工*/
+ emp: {
+ // 是否显示弹出层
+ open: false,
+ // 列表遮罩层
+ loading: true,
+ // 列表查询参数
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ name: undefined
+ },
+ // 表格数据
+ list: [],
+ // 总条数
+ total: 0,
},
- showClass: false
};
},
created() {
-
- this.getList();
- this.getNamelist()
- this.getDeptTree();
+ if (!this.$store.state.user.tenantId) {
+ this.getGsInfoList()
+ }else {
+ this.gsInfo.active_id = this.$store.state.user.tenantId
+ this.getList()
+ }
},
methods: {
// 获取左侧公司列表
@@ -425,7 +483,6 @@ export default {
this.gsInfo.list = response.rows;
this.gsInfo.active_id = this.gsInfo.list[0].id
this.getList()
- this.getDeptTree();
}else{
this.$alert(`没有查到相关公司,暂无数据!`, `提示`, {
type: 'warning'
@@ -437,30 +494,17 @@ export default {
changCompany(id){
this.gsInfo.active_id = id
this.getList()
- this.getDeptTree();
},
/** 查询考勤列表 */
getList() {
this.loading = true;
+ this.queryParams.tenantId = this.gsInfo.active_id;
listAttendance(this.queryParams).then(response => {
this.attendanceList = response.rows;
this.total = response.total;
this.loading = false;
});
},
- /** 查询员工 */
- getNamelist() {
- listEmployeeInfo({ pageNum: 1, pageSize: 10000000,}).then(response => {
- this.employeeList = response.rows;
- })
- },
- /** 查询部门下拉树结构 */
- getDeptTree() {
- deptTreeSelect().then(response => {
- // deptTreeSelect().then(response => {
- this.deptOptions = response.data;
- });
- },
// 取消按钮
cancel() {
this.open = false;
@@ -566,18 +610,38 @@ export default {
}, `attendance_${new Date().getTime()}.xlsx`)
},
// 选择员工
- changeEmployee(val){
- this.form.employeeId = val;
+ selectEmployee(){
+ this.emp.open = true;
+ this.emp.queryParams.pageNum = 1;
+ this.empQuery();
+ },
+ /** 员工列表查询 */
+ empQuery() {
+ this.emp.loading = true;
+ this.emp.queryParams.tenantId = this.gsInfo.active_id
+ listEmployeeInfo(this.emp.queryParams).then(response => {
+ this.emp.list = response.rows;
+ this.emp.total = response.total;
+ this.emp.loading = false;
+ });
+ },
+ /** 员工选择弹出框关闭*/
+ empCancel() {
+ this.emp.open = false
},
- // 选择部门
- changeDept(val){
- this.form.deptId=val.id
- this.form.deptName=val.label
+ // 客户选择 选中数据
+ empRowChange(val) {
+ this.form.employeeId = val.id;
+ this.form.empName = val.name;
+ this.form.deptId = val.deptId;
+ this.form.deptName = val.deptName;
+ this.emp.open = false;
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = "考勤导入";
this.upload.open = true;
+ this.upload.tenantId = this.gsInfo.active_id;
},
/** 下载模板操作 */
/* importTemplate() {
diff --git a/ruoyi-ui/src/views/pay/butie/index.vue b/ruoyi-ui/src/views/pay/butie/index.vue
index 3564212..0ef44d4 100644
--- a/ruoyi-ui/src/views/pay/butie/index.vue
+++ b/ruoyi-ui/src/views/pay/butie/index.vue
@@ -1,141 +1,162 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
-
-
-
- 新增
-
-
- 修改
-
-
- 删除
-
-
- 导出
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
新增
+
+
+ 修改
+
+
删除
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
-
+
+
+
-
-
+
+
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
@@ -151,11 +172,19 @@
+
+