diff --git a/src/api/model/hrm.js b/src/api/model/hrm.js
index 9d34f8d8..023e89fb 100644
--- a/src/api/model/hrm.js
+++ b/src/api/model/hrm.js
@@ -231,4 +231,39 @@ export default {
}
},
},
+ empjoin: {
+ list: {
+ name: "人员交接",
+ req: async function(data){
+ return await http.get(
+ `${config.API_URL}/hrm/empjoin/`,
+ data
+ );
+ }
+ },
+ item: {
+ name: "人员交接申请",
+ req: async function(id){
+ return await http.get(
+ `${config.API_URL}/hrm/empjoin/${id}/`,
+ );
+ }
+ },
+ create: {
+ name: "人员交接新增",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/hrm/empjoin/`,
+ data);
+ }
+ },
+ delete: {
+ name: "人员交接删除",
+ req: async function(id){
+ return await http.delete(
+ `${config.API_URL}/hrm/empjoin/${id}/`
+ );
+ }
+ },
+ },
}
diff --git a/src/views/hrm/empjoin.vue b/src/views/hrm/empjoin.vue
index dc1ae8c8..a5b8e4ec 100644
--- a/src/views/hrm/empjoin.vue
+++ b/src/views/hrm/empjoin.vue
@@ -15,6 +15,7 @@
@row-click="(row)=>{t_id=row.id;mode='show';drawerVisible=true;}"
>
+
diff --git a/src/views/hrm/empjoin_form.vue b/src/views/hrm/empjoin_form.vue
index 0e0c9ba3..a571a4c2 100644
--- a/src/views/hrm/empjoin_form.vue
+++ b/src/views/hrm/empjoin_form.vue
@@ -2,77 +2,86 @@
-
+
-
- {{ formData.employee_name }}({{ formData.belong_dept_name }} - {{ formData.post_name }})
-
-
-
-
-
-
-
-
-
-
-
-
- 男
- 女
- 不限
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
删除
import ticketd_b from "@/views/wf/ticketd_b.vue";
-import ticketd from '@/views/wf/ticketd.vue'
+import ticketd from '@/views/wf/ticketd.vue';
+import { genTree } from "@/utils/verificate";
export default {
- name: 'EnpNeedForm',
+ name: 'EnpJoinForm',
components: {
ticketd_b,
ticketd
@@ -125,55 +136,74 @@ export default {
data() {
return {
formData: {
+ person: [],
},
+ ticket_data: {},
localMode: this.mode,
saveLoading: false,
group:[],
+ post:[],
+ apiObjPost: this.$API.system.post.list,
+ hideAdd:false,
+ hideDelete:false,
+ addTemplate: {
+ name: "",
+ gender: "",
+ age: "",
+ phone: "",
+ note: "",
+ },
groupsProps: {
multiple: false,
emitPath: false,
checkStrictly: true,
+ },
+ }
+ },
+ watch: {
+ formData: {
+ handler(val){
+ Object.assign(this.ticket_data,{
+ person: val.person,
+ })
},
+ deep: true,
}
- },
+ },
mounted() {
this.getGroup();
if (this.t_id) {
this.getTid();
} else {
- this.initFormData();
+ this.localMode = "add";
}
},
methods: {
- async initFormData() {
- try {
- let res = await this.$API.hrm.employee.read.req();
- this.formData.employee_name = res.name;
- this.formData.belong_dept_name = res.belong_dept_name;
- this.formData.post_name = res.post_name;
- this.formData.employee = res.id;
- this.localMode = "add";
- } catch (error) {
- console.error('初始化表单数据失败:', error);
- }
- },
async getTid() {
try {
- let res = await this.$API.hrm.empneed.item.req(this.t_id);
+ let res = await this.$API.hrm.empjoin.item.req(this.t_id);
this.formData = res;
if (res.ticket_ && res.ticket_.state_.type == 1 && res.create_by == this.$TOOL.data.get("USER_INFO").id) {
this.localMode = "edit";
}
} catch (error) {
- console.error('获取离职数据失败:', error);
+ console.error('获取数据失败:', error);
}
},
+ async getGroup() {
+ let res = await this.$API.system.dept.list.req({ page: 0 });
+ this.group = genTree(res);
+ },
+ async getPost() {
+ let res = await this.$API.hrm.post.list.req({ page: 0 });
+ this.post = res;
+ },
handleDel() {
this.$confirm(`确定删除吗?`, "提示", {
type: "warning",
})
.then(()=>{
- this.$API.hrm.empneed.delete.req(this.formData.id).then(res=>{
+ this.$API.hrm.empjoin.delete.req(this.formData.id).then(res=>{
this.$message.success("删除成功");
this.$emit('success');
})
@@ -182,7 +212,8 @@ export default {
async handleSave() {
if (this.localMode == "add") {
try {
- let res = await this.$API.hrm.empneed.create.req(this.formData);
+ console.log('formData', this.formData);
+ let res = await this.$API.hrm.empjoin.create.req(this.formData);
this.$message.success("提交成功");
this.$emit('success', this.localMode);
} catch (error) {
@@ -192,7 +223,12 @@ export default {
} else if (this.localMode == "edit") {
this.$message.error("不支持编辑");
}
- }
+ },
+ handleQuery() {
+ this.$refs.table.queryData(this.query);
+ },
+
+
}
}
\ No newline at end of file
diff --git a/src/views/hrm/empneed_form.vue b/src/views/hrm/empneed_form.vue
index dc068299..21e033ec 100644
--- a/src/views/hrm/empneed_form.vue
+++ b/src/views/hrm/empneed_form.vue
@@ -81,14 +81,14 @@
:loading="saveLoading"
>删除
{
that.localForm = res;
- if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
+ if(res.ticket_.state_ && res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
that.localMode = "edit";
}else{
that.localMode = "show";
diff --git a/src/views/srm/plat_form.vue b/src/views/srm/plat_form.vue
index 6ef2c907..3343b8dc 100644
--- a/src/views/srm/plat_form.vue
+++ b/src/views/srm/plat_form.vue
@@ -17,8 +17,15 @@
>
-
-
+
+
@@ -74,7 +81,9 @@