Compare commits

..

No commits in common. "8a8a70b4396f2408d245dbccf438f8db193230d8" and "fa182745a34d3a7fd7c4444c3afc80fcafbceb76" have entirely different histories.

1 changed files with 11 additions and 21 deletions

View File

@ -43,28 +43,20 @@
</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
v-if ="formData.ticket_"
:workflow_key="'wf_supplieraudit'"
:title="ticketTitle"
: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_">
@ -98,7 +90,7 @@ export default {
survery_form_: null
},
localMode: this.mode,
saveLoading: false,
ticketTitle: "供应商审核"
}
},
watch: {
@ -132,18 +124,16 @@ export default {
})
})
},
handleSave() {
async submit_b_func() {
if (this.localMode == "add") {
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);
let res = await this.$API.pum.supplieraudit.create.req(this.formData);
this.ticketTitle = this.formData.name + "的供应商审核";
this.formData.id = res.id;
return res.id;
} else if (this.localMode == "edit") {
this.$message.error("不支持编辑!")
console.log(this.formData);
this.$message.error("不支持编辑");
throw new Error("不支持编辑");
}
},
}