diff --git a/pages/sys/workbench/unitManagement/auditsDetail.vue b/pages/sys/workbench/unitManagement/auditsDetail.vue
index 3ab97ee..8863854 100644
--- a/pages/sys/workbench/unitManagement/auditsDetail.vue
+++ b/pages/sys/workbench/unitManagement/auditsDetail.vue
@@ -12,7 +12,7 @@
性别:
- 男
+ {{auditsDetail.gender === 1? '男' : '女'}}
证件号:
@@ -24,7 +24,7 @@
所属单位:
- {{auditsDetail.name}}
+ {{auditsDetail.unitName}}
@@ -53,7 +53,7 @@
-
+
@@ -121,7 +121,6 @@
this.auditsDetail = res.data;
});
}
- // 其他原有方法...
}
};
diff --git a/pages/sys/workbench/unitManagement/employeeAudits.vue b/pages/sys/workbench/unitManagement/employeeAudits.vue
index ec51f3c..758e862 100644
--- a/pages/sys/workbench/unitManagement/employeeAudits.vue
+++ b/pages/sys/workbench/unitManagement/employeeAudits.vue
@@ -23,21 +23,21 @@
{{ item.userName }}
{{ item.phone }}
- {{ item.applyTime }}
+ {{ item.createTime }}
- {{ item.status === '1' ? "待处理" : "已处理" }}
+ {{ item.isAuditState === 1 ? "待处理" : "已处理" }}
@@ -86,7 +86,6 @@ export default {
let res = await this.$u.api.unit.queryEmployee({
pageNum: this.pageNum,
pageSize: this.pageSize,
- isAudit:2
});
if (res.code == "200") {
let rows = res.rows || [];
diff --git a/pages/sys/workbench/unitManagement/employeeEdit.vue b/pages/sys/workbench/unitManagement/employeeEdit.vue
index 99a6486..5b6ef7e 100644
--- a/pages/sys/workbench/unitManagement/employeeEdit.vue
+++ b/pages/sys/workbench/unitManagement/employeeEdit.vue
@@ -6,23 +6,23 @@
用户姓名:
- 余永乐
+ {{employeeDetail.userName}}
性别:
- 男
+ {{employeeDetail.gender === 1? '男' : '女'}}
证件号:
- 5001255658789955
+ {{employeeDetail.idCard}}
联系电话:
- 17898987887
+ {{employeeDetail.phone}}
所属单位:
- x x x x x
+ {{employeeDetail.unitName}}
@@ -30,7 +30,7 @@
人脸图片:
@@ -41,11 +41,11 @@
邮箱:
- -
+ {{employeeDetail.email}}
车牌号:
- -
+ {{employeeDetail.carNumber}}
@@ -54,26 +54,27 @@
入驻时间:
- -
+ {{employeeDetail.updateTime}}
在职状态:
-
-
+
+
启用
-
-
+
+
禁用
+
@@ -82,14 +83,17 @@ export default {
data() {
return {
pageType: 'handle', // 'handle' 或 'detail'
- auditsDetail: {status:'0'},
- handleDesc: '',
- selectedImages: [],
- realImages: [],
- infoImages: []
+ employeeDetail: {},
};
},
methods: {
+ onLoad(options) {
+ if (options.id) {
+ const id = options.id;
+ this.employeeDetail.id = id;
+ this.queryEmployee();
+ }
+ },
// 原有方法保持不变...
handleApprove() {
console.log('approve');
@@ -100,19 +104,28 @@ export default {
async submit(action) {
// 提交逻辑...
},
+ queryEmployee(){
+ this.$u.api.unit.queryEmployeeById(this.employeeDetail).then(res => {
+ this.employeeDetail = res.data;
+ });
+ },
// 新增状态变更方法
- changeStatus(item, newStatus) {
- item.status = newStatus;
- // 这里可以添加API调用更新状态
- this.$u.api.updateEmployeeStatus({
- id: item.id,
- status: newStatus
- }).then(res => {
- if (res.code === '200') {
+ changeStatus(newState) {
+ this.employeeDetail.state = newState;
+ },
+ saveInfo(){
+ console.log( this.employeeDetail);
+ this.$u.api.unit.updateEmployee( this.employeeDetail).then(res => {
+ if (res.code === 200) {
uni.showToast({
title: '状态更新成功',
icon: 'success'
});
+ }else {
+ uni.showToast({
+ title: '状态更新失败',
+ icon: 'none'
+ });
}
});
}
@@ -252,4 +265,15 @@ export default {
font-size: 28rpx;
color: #333;
}
+
+.submit-btn {
+ width: 100%;
+ height: 44px;
+ line-height: 44px;
+ font-size: 16px;
+ color: #fff;
+ background-color: #409eff;
+ border-radius: 4px;
+ border: none;
+}
\ No newline at end of file
diff --git a/pages/sys/workbench/unitManagement/employeeManagement.vue b/pages/sys/workbench/unitManagement/employeeManagement.vue
index 3371d8f..5b1bb0c 100644
--- a/pages/sys/workbench/unitManagement/employeeManagement.vue
+++ b/pages/sys/workbench/unitManagement/employeeManagement.vue
@@ -6,7 +6,7 @@
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
- {{ item.name }}
-
-
- {{ item.phone }}
-
-
-
-
-
- {{ formatDate(item.applyTime ) }}
+
+
+
+ {{ item.userName }}
+
+ {{ item.phone }}
+
+
+
+
+ {{ formatDate(item.createTime) }}
+
+
-
- 加载中...
- 没有更多数据了
- 未找到匹配结果
-
-
+
+ 加载中...
+ 没有更多数据了
+ 未找到匹配结果
+
+