This commit is contained in:
shijing 2025-11-13 15:29:25 +08:00
commit 0cbbb46957
1 changed files with 21 additions and 11 deletions

View File

@ -43,20 +43,28 @@
</el-form-item>
</el-form>
<el-footer>
<el-button type="danger"
v-if="localMode=='edit'"
v-auth="'supplieraudit.delete'"
:loading="saveLoading"
style="margin-right: 4px;"
@click="handleDel"
>删除</el-button>
<ticketd_b
:workflow_key="'wf_supplieraudit'"
:title="ticketTitle"
v-if ="formData.ticket_"
:t_id="formData.id"
:ticket_="formData.ticket_"
@success="$emit('success', localMode)"
:submit_b_func="submit_b_func"
ref="ticketd_b"
></ticketd_b>
<el-button
v-else
type="primary"
style="margin-right: 4px;"
@click="handleSave"
>提交审批</el-button>
</el-footer>
</el-main>
<el-aside width="20%" v-if="formData.ticket_">
@ -90,7 +98,7 @@ export default {
survery_form_: null
},
localMode: this.mode,
ticketTitle: "供应商审核"
saveLoading: false,
}
},
watch: {
@ -124,16 +132,18 @@ export default {
})
})
},
async submit_b_func() {
handleSave() {
if (this.localMode == "add") {
let res = await this.$API.pum.supplieraudit.create.req(this.formData);
this.ticketTitle = this.formData.name + "的供应商审核";
this.formData.id = res.id;
return res.id;
this.saveLoading = true;
this.$API.pum.supplieraudit.create.req(this.formData).then(res=>{
this.saveLoading = true;
this.$message.success("提交成功");
}).catch(e=>{
this.saveLoading = false;
})
this.$emit('success', this.localMode);
} else if (this.localMode == "edit") {
console.log(this.formData);
this.$message.error("不支持编辑");
throw new Error("不支持编辑");
this.$message.error("不支持编辑!")
}
},
}