fix:退火日志去除审批,退货交接添加审批

This commit is contained in:
shijing 2025-07-25 13:40:42 +08:00
parent 0131173d97
commit cb0c6cfadb
3 changed files with 143 additions and 187 deletions

View File

@ -103,7 +103,7 @@
</el-card> </el-card>
<el-card <el-card
style="margin-top: 4px; position: relative" style="margin-top: 4px; position: relative"
v-if="cateType === 'rpj'" v-if="cateType == 'rpj'"
> >
<el-descriptions title="入厂项目" :column="3"> <el-descriptions title="入厂项目" :column="3">
<el-descriptions-item label="相关方:"> <el-descriptions-item label="相关方:">
@ -209,6 +209,36 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-card
style="margin-top: 4px; position: relative"
v-if="cateType == 'backfire'"
header="交接信息"
>
<el-descriptions :column="6">
<el-descriptions-item label="交送部门:" v-if="handoverItem.send_dept_name">
{{handoverItem.send_dept_name}}
</el-descriptions-item>
<el-descriptions-item label="交送工段:" v-if="handoverItem.send_mgroup_name">
{{ handoverItem.send_mgroup_name }}
</el-descriptions-item>
<el-descriptions-item label="接收部门:" v-if="handoverItem.recive_dept_name">
{{handoverItem.recive_dept_name}}
</el-descriptions-item>
<el-descriptions-item label="接收工段:" v-if="handoverItem.recive_mgroup_name">
{{ handoverItem.recive_mgroup_name }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="6" v-for="item in ticketDetail.handoverb" :key="item.id">
<el-descriptions-item label="批次号:">
{{item.batch}}
</el-descriptions-item>
<el-descriptions-item label="数量:">
{{ item.count }}
</el-descriptions-item>
</el-descriptions>
交接文件
<el-link :href="ticketDetail.test_file" type="primary" target="_blank">{{ticketDetail.test_file}}</el-link>
</el-card>
<el-card <el-card
style="margin-top: 4px; position: relative" style="margin-top: 4px; position: relative"
header="处理日志" header="处理日志"
@ -596,6 +626,7 @@ export default {
{ id: 40, name: "其他" }, { id: 40, name: "其他" },
], ],
dosOption: [], dosOption: [],
handoverItem:{},
submitLoading: false, submitLoading: false,
userId: this.$TOOL.data.get("USER_INFO").id, userId: this.$TOOL.data.get("USER_INFO").id,
isOwn: false, isOwn: false,
@ -610,6 +641,7 @@ export default {
}, },
mounted() { mounted() {
this.submitLoading = false; this.submitLoading = false;
this.getticketItem();
if (this.cateType === "visit") { if (this.cateType === "visit") {
this.getVisit(); this.getVisit();
} else if (this.cateType === "rpj") { } else if (this.cateType === "rpj") {
@ -621,7 +653,6 @@ export default {
} else if (this.cateType === "opl") { } else if (this.cateType === "opl") {
this.getOpl(); this.getOpl();
} }
this.getticketItem();
this.getBtns(); this.getBtns();
}, },
methods: { methods: {
@ -741,6 +772,17 @@ export default {
that.ticketDetail.test_file = res1.test_file; that.ticketDetail.test_file = res1.test_file;
}) })
} }
if(res.ticket_data.t_model&&res.ticket_data.t_model=="handover"){
that.$API.wpm.handover.item.req(res.ticket_data.t_id).then((res1) => {
that.handoverItem = res1;
that.ticketDetail.routepack_name = res1.routepack_name;
that.ticketDetail.handoverb = res1.handoverb;
that.ticketDetail.material_in_name = res1.material_in_name;
that.ticketDetail.material_out_name = res1.material_out_name;
that.ticketDetail.handle_user_name = res1.handle_user_name;
that.ticketDetail.test_file = res1.oinfo_json.test_file;
})
}
if (this.ticketDetail.state_.key == "opl_close") { if (this.ticketDetail.state_.key == "opl_close") {
// , // ,
this.getCloseDos(); this.getCloseDos();

View File

@ -176,10 +176,34 @@
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input> <el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24" v-if="route_code=='tuihuo'">
<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-col>
</el-row> </el-row>
</el-form> </el-form>
<el-footer v-if="mode!=='show'"> <el-footer v-show="mode!=='show'">
<el-button type="primary" v-loading="isSaveing" @click="submit">确定</el-button> <template v-if="route_code=='tuihuo'&&type==10&&mtype==10">
<el-button
v-for="item in initForm.transitions"
:key="item.id"
type="primary"
:loading="isSaveing"
:disabled="isSaveing"
@click="submitTicketCreate(item.id)"
style="margin-right: 4px"
>{{ item.name }}</el-button>
</template>
<el-button v-else type="primary" v-loading="isSaveing" @click="submit">确定</el-button>
<el-button @click="visible = false">取消</el-button> <el-button @click="visible = false">取消</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -237,6 +261,7 @@ export default {
recive_mgroup: null, recive_mgroup: null,
handoverb:[], handoverb:[],
}, },
initForm:{},
selectObjIds:[], selectObjIds:[],
apiObjM:null, apiObjM:null,
paramsM:{}, paramsM:{},
@ -294,7 +319,9 @@ export default {
listParams:{}, listParams:{},
totalCount: 0, totalCount: 0,
deptID:'', deptID:'',
route_code:'',
codeText: "", codeText: "",
fileList:[],
userList: [], userList: [],
userList2: [], userList2: [],
mgroupOptions: [], mgroupOptions: [],
@ -314,6 +341,7 @@ export default {
that.materialObj = materialObj; that.materialObj = materialObj;
that.form.handle_date = that.form.send_date = this.$TOOL.dateFormat2(new Date()); that.form.handle_date = that.form.send_date = this.$TOOL.dateFormat2(new Date());
that.form.send_mgroup = that.mgroupId; that.form.send_mgroup = that.mgroupId;
that.route_code = that.$route.path.split("/")[2];
//type 10: 20: 40: //type 10: 20: 40:
//mtype 10: 20: 30: //mtype 10: 20: 30:
// //
@ -347,8 +375,19 @@ export default {
}else{ }else{
that.getMgroupOptions(); that.getMgroupOptions();
} }
if(that.route_code=='tuihuo'){
that.getInit();
}
}, },
methods: { methods: {
//
getInit() {
let that = this;
that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
that.initForm = res;
let transitions = res.transitions;
});
},
// //
getMgroupOptions() { getMgroupOptions() {
let that = this; let that = this;
@ -499,6 +538,30 @@ export default {
that.totalCount = totalCount; that.totalCount = totalCount;
} }
}, },
fileUPSuccess(res) {
this.test_file = res.path;
},
//退,
submitTicketCreate(id) {
let that = this;
that.form.oinfo_json = {};
that.form.oinfo_json.test_file = that.test_file;
that.$API.wpm.handover.create.req(that.form).then((res) => {
let ticket = {};
that.isSaveing = true;
ticket.title = '退火交接审批单';
ticket.workflow = that.initForm.workflow;
ticket.ticket_data = {t_id: res.id};
ticket.transition = id;
that.$API.wf.ticket.create.req(ticket).then((res) => {
that.isSaveing = false;
that.visible = false;
that.$message.success("提交成功");
}).catch((e) => {
that.isSaveing = false;
});
});
},
// //
submit() { submit() {
let that = this; let that = this;

View File

@ -48,17 +48,14 @@
<el-descriptions-item label="结束时间">{{ <el-descriptions-item label="结束时间">{{
mlogItem.work_end_time mlogItem.work_end_time
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="工单状态" v-if="mlogItem.mgroup_name=='退火'"> <el-descriptions-item label="检验表单" v-if="mlogItem.mgroup_name=='黑化'">
<el-tag v-if="mlogItem.ticket_">{{act_states[mlogItem.ticket_.act_state]}}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="检验表单" v-if="mlogItem.mgroup_name=='退火'||mlogItem.mgroup_name=='黑化'">
<el-link :href="mlogItem.test_file" target="_blank" type="primary" :underline="false">{{mlogItem.test_file}}</el-link> <el-link :href="mlogItem.test_file" target="_blank" type="primary" :underline="false">{{mlogItem.test_file}}</el-link>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<div style="padding: 5px 10px;display: flex;justify-content: end;"> <div style="padding: 5px 10px;display: flex;justify-content: end;">
<el-button <el-button
type="primary" type="primary"
v-if="mlogItem.submit_time == null&&(mlogItem.ticket==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1))" v-if="mlogItem.submit_time == null"
@click="mlogUpdate" @click="mlogUpdate"
style="margin-right: 10px;" style="margin-right: 10px;"
v-auth="'mlog.update'" v-auth="'mlog.update'"
@ -67,18 +64,11 @@
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
v-if="mlogItem.mgroup_name!='退火'&&mlogItem.submit_time == null" v-if="mlogItem.submit_time == null"
:loading="isSaveing" :loading="isSaveing"
@click="mlogSubmit" @click="mlogSubmit"
>提交</el-button >提交</el-button
> >
<!-- 退火-->
<el-button
type="primary"
v-if="mlogItem.mgroup_name=='退火'&&(mlogItem.ticket==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1))"
:loading="isSaveing"
@click="createTicket"
>放行审批</el-button>
</div> </div>
</el-card> </el-card>
<!-- 输入物料 --> <!-- 输入物料 -->
@ -311,30 +301,6 @@
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-card> </el-card>
<!-- 工段物料库存 -->
<!-- <el-card style="width: 100%" header="工段物料列表" shadow="never">
<scTable
ref="tableWm"
:apiObj="apiObjWm"
:params="paramsWm"
stripe
hidePagination
>
<el-table-column label="物料名称" prop="material_name" show-overflow-tooltip>
</el-table-column>
<el-table-column label="批次号" prop="batch">
</el-table-column>
<el-table-column label="数量" prop="count">
</el-table-column>
<el-table-column label="不合格标记" prop="notok_sign_name">
</el-table-column>
<el-table-column width="100">
<template #default="scope">
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
</template>
</el-table-column>
</scTable>
</el-card> -->
<save-dialog <save-dialog
v-if="dialog.save" v-if="dialog.save"
ref="saveDialog" ref="saveDialog"
@ -374,90 +340,6 @@
@closed="dialog.edit = false" @closed="dialog.edit = false"
> >
</edit-dialog> </edit-dialog>
<!-- 退火放行通知单 -->
<el-dialog v-model="ticketDialog" title="退火放行通知单">
<el-form
:model="saveInForm"
:rules="rules"
label-width="100px"
ref="saveInForm"
>
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="退火炉号">
<el-input v-model="oinfo_json.退火炉号"/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="退火时间">
<el-input-number
v-model="oinfo_json.退火时间"
:min="1"
controls-position="right"
/>min
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="退火温度">
<el-input-number
v-model="oinfo_json.退火温度"
:min="1"
style="width: 100%"
controls-position="right"
/>
<span style="position: absolute;right: -17px;">°C</span>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="抽检结果">
<el-input v-model="oinfo_json.抽检结果"/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="抽检数">
<el-input-number
v-model="oinfo_json.抽检数"
:precision="0"
:min="1"
style="width: 100%"
controls-position="right"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="强度落球">
<el-input v-model="oinfo_json.强度落球"/>
</el-form-item>
</el-col>
</el-row>
<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
v-for="item in initForm.transitions"
:key="item.id"
type="primary"
:loading="isSaveing"
:disabled="isSaveing"
@click="submitTicketCreate(item.id)"
style="margin-right: 4px"
>{{ item.name }}</el-button
>
</template>
</el-dialog>
<el-dialog v-model="printVisible" width="1200px"> <el-dialog v-model="printVisible" width="1200px">
<print :baseData="mlogItem" :tableData="tableData" :tableData2="tableData2" type="102" @closePrint="printVisible=false"/> <print :baseData="mlogItem" :tableData="tableData" :tableData2="tableData2" type="102" @closePrint="printVisible=false"/>
</el-dialog> </el-dialog>
@ -535,14 +417,6 @@ export default {
count_use: 0, count_use: 0,
count_pn_jgqbl: 0, count_pn_jgqbl: 0,
}, },
oinfo_json:{
退火炉号:'',
退火时间:'',
退火温度:'',
抽检结果:'',
抽检数:'',
强度落球:'',
},
act_states: { act_states: {
0: "草稿中", 0: "草稿中",
1: "进行中", 1: "进行中",
@ -568,7 +442,7 @@ export default {
mlogbdefect:[], mlogbdefect:[],
mlogboutdefect:[], mlogboutdefect:[],
saveInDialog: false, saveInDialog: false,
ticketDialog:false, // ticketDialog:false,
printVisible:false, printVisible:false,
setFiltersVisible: false, setFiltersVisible: false,
rules: { rules: {
@ -593,7 +467,7 @@ export default {
this.paramsIn.mlog = this.mlogId; this.paramsIn.mlog = this.mlogId;
this.paramsOut.mlog = this.mlogId; this.paramsOut.mlog = this.mlogId;
this.apiObj = this.$API.wpm.mlogb.list; this.apiObj = this.$API.wpm.mlogb.list;
this.getInit(); // this.getInit();
that.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => { that.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => {
that.tableData = res; that.tableData = res;
}) })
@ -632,7 +506,6 @@ export default {
}) })
}); });
}, },
getdefects(){ getdefects(){
let that = this; let that = this;
that.$API.qm.qct.list.req({qctmat__material:that.mlogItem.material_in,page:0,tags:'process'}).then((res) => { that.$API.qm.qct.list.req({qctmat__material:that.mlogItem.material_in,page:0,tags:'process'}).then((res) => {
@ -651,7 +524,6 @@ export default {
}) })
} }
}) })
}, },
countChange() { countChange() {
let that = this; let that = this;
@ -661,7 +533,6 @@ export default {
that.saveInForm.count_pn_jgqbl += that.defectinform[item.defect_name]; that.saveInForm.count_pn_jgqbl += that.defectinform[item.defect_name];
} }
}) })
// that.countCellChanges();
}, },
// //
setData(data) { setData(data) {
@ -675,9 +546,6 @@ export default {
this.$refs.editDialog.open("edit").setData(this.mlogItem); this.$refs.editDialog.open("edit").setData(this.mlogItem);
}); });
}, },
// mlogUpdate(data) {
// this.$refs.editDialog.open().setData(data);
// },
table_add() { table_add() {
this.dialog.save = true; this.dialog.save = true;
this.$nextTick(() => { this.$nextTick(() => {
@ -698,7 +566,6 @@ export default {
that.saveInDialog = true; that.saveInDialog = true;
} }
}, },
// //
saveInSubmit() { saveInSubmit() {
let that = this; let that = this;
@ -752,7 +619,6 @@ export default {
that.$refs.checkDialog.open(obj); that.$refs.checkDialog.open(obj);
}); });
}, },
// //
mlogSubmit() { mlogSubmit() {
let that = this; let that = this;
@ -762,50 +628,35 @@ export default {
that.$message.success("操作成功"); that.$message.success("操作成功");
}); });
}, },
// // //
getInit() { // getInit() {
let that = this; // let that = this;
that.$API.wf.workflow.initkey.req(" backfire").then((res) => { // that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
that.initForm = res; // that.initForm = res;
}); // });
}, // },
//退 // //退,
createTicket(){ // submitTicketCreate(id) {
if(this.mlogItem.work_end_time==null){ // let that = this;
this.$message.error("请先编辑日志并选择结束时间"); // let obj = {};
}else{ // obj.test_file = that.test_file;
let sum = 0; // that.$API.wpm.mlog.change.req(that.mlogItem.id, obj).then((res) => {
this.mlogItem.reminder_interval_list.forEach(item => { // let ticket = {};
sum+=item; // that.isSaveing = true;
}); // ticket.title = '退';
this.oinfo_json.退火时间 = sum; // ticket.workflow = that.initForm.workflow;
this.oinfo_json.退火炉号 =this.mlogItem.equipment_name!==null?this.mlogItem.equipment_name.split("|")[0]:''; // ticket.ticket_data = {t_id: that.mlogItem.id};
this.ticketDialog = true; // ticket.transition = id;
} // that.$API.wf.ticket.create.req(ticket).then((res) => {
}, // that.isSaveing = false;
//退, // that.ticketDialog = false;
submitTicketCreate(id) { // that.visible = false;
let that = this; // that.$message.success("");
let obj = {}; // }).catch((e) => {
obj.oinfo_json = that.oinfo_json; // that.isSaveing = false;
obj.test_file = that.test_file; // });
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.visible = false;
that.$message.success("提交成功");
}).catch((e) => {
that.isSaveing = false;
});
});
},
codeTextChange(codeText){ codeTextChange(codeText){
this.codeText = codeText; this.codeText = codeText;
this.dialog.save = true; this.dialog.save = true;