Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
faacaa8d8e
|
|
@ -30,16 +30,22 @@
|
||||||
v-if="localMode=='edit'"
|
v-if="localMode=='edit'"
|
||||||
style="margin-right: 4px;"
|
style="margin-right: 4px;"
|
||||||
@click="handleDel"
|
@click="handleDel"
|
||||||
|
:loading="saveLoading"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
<ticketd_b
|
<ticketd_b
|
||||||
:workflow_key="'wf_resignation'"
|
v-if = "formData.ticket_"
|
||||||
:title="ticketTitle"
|
|
||||||
:t_id="formData.id"
|
:t_id="formData.id"
|
||||||
:ticket_="formData.ticket_"
|
:ticket_="formData.ticket_"
|
||||||
@success="$emit('success', localMode)"
|
@success="$emit('success', localMode)"
|
||||||
:submit_b_func="submit_b_func"
|
|
||||||
ref="ticketd_b"
|
ref="ticketd_b"
|
||||||
></ticketd_b>
|
></ticketd_b>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
type="primary"
|
||||||
|
style="margin-right: 4px;"
|
||||||
|
@click="handleSave"
|
||||||
|
:loading="saveLoading"
|
||||||
|
>提交审批</el-button>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-aside width="20%" v-if="formData.ticket_">
|
<el-aside width="20%" v-if="formData.ticket_">
|
||||||
|
|
@ -74,12 +80,7 @@ export default {
|
||||||
employee_name: ""
|
employee_name: ""
|
||||||
},
|
},
|
||||||
localMode: this.mode,
|
localMode: this.mode,
|
||||||
ticketTitle: "离职申请"
|
saveLoading: false
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
mode(newVal) {
|
|
||||||
this.localMode = newVal;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -124,20 +125,18 @@ export default {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async submit_b_func() {
|
async handleSave() {
|
||||||
if (this.localMode == "add") {
|
if (this.localMode == "add") {
|
||||||
try {
|
try {
|
||||||
let res = await this.$API.hrm.resignation.create.req(this.formData);
|
let res = await this.$API.hrm.resignation.create.req(this.formData);
|
||||||
this.ticketTitle = this.formData.employee_name + "的离职申请";
|
this.$message.success("提交成功");
|
||||||
this.formData.id = res.id;
|
this.$emit('success', this.localMode);
|
||||||
return res.id;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('提交离职申请失败:', error);
|
console.error('提交离职申请失败:', error);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
} else if (this.localMode == "edit") {
|
} else if (this.localMode == "edit") {
|
||||||
this.$message.error("不支持编辑");
|
this.$message.error("不支持编辑");
|
||||||
throw new Error("不支持编辑");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
style="margin-right: 4px;"
|
style="margin-right: 4px;"
|
||||||
@click="handleSave"
|
@click="handleSave"
|
||||||
|
:loading="saveLoading"
|
||||||
>提交审批</el-button>
|
>提交审批</el-button>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
|
@ -137,10 +138,10 @@ export default {
|
||||||
this.$API.pum.supplieraudit.create.req(this.formData).then(res=>{
|
this.$API.pum.supplieraudit.create.req(this.formData).then(res=>{
|
||||||
this.saveLoading = true;
|
this.saveLoading = true;
|
||||||
this.$message.success("提交成功");
|
this.$message.success("提交成功");
|
||||||
|
this.$emit('success', this.localMode);
|
||||||
}).catch(e=>{
|
}).catch(e=>{
|
||||||
this.saveLoading = false;
|
this.saveLoading = false;
|
||||||
})
|
})
|
||||||
this.$emit('success', this.localMode);
|
|
||||||
} else if (this.localMode == "edit") {
|
} else if (this.localMode == "edit") {
|
||||||
this.$message.error("不支持编辑!")
|
this.$message.error("不支持编辑!")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue