fix:退货放行单日志提交时上传excel文件,并存在日志里

This commit is contained in:
shijing 2024-09-04 13:37:02 +08:00
parent 67b5d82545
commit a3b2c0a2b5
3 changed files with 53 additions and 30 deletions

View File

@ -52,7 +52,7 @@
</el-table-column>
<el-table-column label="检验日期" prop="test_date">
</el-table-column>
<el-table-column label="检验人" prop="start_date">
<el-table-column label="检验人" prop="test_user_name">
</el-table-column>
<!-- <el-table-column label="操作" fixed="right" width="60">
<template #default="scope">

View File

@ -274,7 +274,7 @@
</el-main>
<el-footer>
<el-button type="primary" :loading="isSaveing" @click="submit"
>保存</el-button>
>提交</el-button>
<el-button @click="visible = false">取消</el-button>
</el-footer>
</el-container>

View File

@ -44,22 +44,20 @@
>
编辑
</el-button>
<div v-if="mlogItem.submit_time == null">
<!-- 退火-->
<el-button
type="primary"
v-if="mlogItem.mgroup_name=='退火'&&(mlogItem.ticket==null||mlogItem.ticket_.state_.type==1)"
:loading="isSaveing"
@click="createTicket"
>放行审批</el-button>
<el-button
type="primary"
v-if="mlogItem.mgroup_name!='退火'"
:loading="isSaveing"
@click="mlogSubmit"
>提交</el-button
>
</div>
<el-button
type="primary"
v-if="mlogItem.mgroup_name!='退火'&&mlogItem.submit_time == null"
:loading="isSaveing"
@click="mlogSubmit"
>提交</el-button
>
<!-- 退火-->
<el-button
type="primary"
v-if="mlogItem.mgroup_name=='退火'&&(mlogItem.ticket==null||mlogItem.ticket_.state_.type==1)"
:loading="isSaveing"
@click="createTicket"
>放行审批</el-button>
</div>
</el-card>
<!-- 物料消耗 -->
@ -352,6 +350,17 @@
<el-row>
<el-form-item label="放行标准">退火后直径23.5±0.2黑圈内径5.9±0.1外径7.6-7.77</el-form-item>
</el-row>
<el-form-item label="检验附件">
<sc-upload-file
v-model="fileList"
:multiple="false"
:limit="1"
:accept="['.xlsx', '.xls']"
@success = "fileUPSuccess"
>
<el-button type="primary" icon="el-icon-upload"> </el-button>
</sc-upload-file>
</el-form-item>
</el-form>
<template #footer>
<el-button
@ -421,6 +430,8 @@ export default {
抽检数:'',
强度落球:'',
},
fileList:[],
test_file:'',
deptId: "",
visible: false,
isSaveing: false,
@ -564,18 +575,26 @@ export default {
//退,
submitTicketCreate(id) {
let that = this;
let ticket = {};
that.isSaveing = true;
ticket.title = '退火放行审批单';
ticket.workflow = that.initForm.workflow;
ticket.ticket_data = {t_id: that.mlogItem.id};
ticket.transition = id;
that.$API.wf.ticket.create.req(ticket).then((res) => {
that.isSaveing = false;
that.ticketDialog = false;
that.$message.success("提交成功");
}).catch((e) => {
that.isSaveing = false;
let obj = {};
obj.oinfo_json = that.oinfo_json;
obj.test_file = that.test_file;
console.log('test_file',that.test_file)
console.log('oinfo_json',that.oinfo_json)
that.$API.wpm.mlog.change.req(that.mlogItem.id, obj)
.then((res) => {
let ticket = {};
that.isSaveing = true;
ticket.title = '退火放行审批单';
ticket.workflow = that.initForm.workflow;
ticket.ticket_data = {t_id: that.mlogItem.id};
ticket.transition = id;
that.$API.wf.ticket.create.req(ticket).then((res) => {
that.isSaveing = false;
that.ticketDialog = false;
that.$message.success("提交成功");
}).catch((e) => {
that.isSaveing = false;
});
});
},
handleSaveSuccess() {
@ -585,6 +604,10 @@ export default {
handleCheckSuccess() {
this.$refs.tableOut.refresh();
},
fileUPSuccess(res) {
console.log('res',res);
this.test_file = res.id;
},
handleEditSuccess() {},
//
setFilters(filters) {