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>
<el-table-column label="检验日期" prop="test_date"> <el-table-column label="检验日期" prop="test_date">
</el-table-column> </el-table-column>
<el-table-column label="检验人" prop="start_date"> <el-table-column label="检验人" prop="test_user_name">
</el-table-column> </el-table-column>
<!-- <el-table-column label="操作" fixed="right" width="60"> <!-- <el-table-column label="操作" fixed="right" width="60">
<template #default="scope"> <template #default="scope">

View File

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

View File

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