feat:修改水平涡流选粉机
This commit is contained in:
zty 2024-10-09 09:27:32 +08:00
commit a831c17838
3 changed files with 112 additions and 68 deletions

View File

@ -26,12 +26,28 @@
ticketDetail.workflow_.name ticketDetail.workflow_.name
}}</span> }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="创建时间:"> <el-descriptions-item label="创建时间:" :column="3">
{{ ticketDetail.create_time }} {{ ticketDetail.create_time }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="工单标题:" :span="3"> <el-descriptions-item label="工单标题:" :column="3">
{{ ticketDetail.title }} {{ ticketDetail.title }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="工艺路线:" :column="3" v-if="ticketDetail.ticket_data&&ticketDetail.ticket_data.t_model=='mlog'">
{{ ticketDetail.routepack_name }}
</el-descriptions-item>
<el-descriptions-item label="输入物料:" :column="3" v-if="ticketDetail.ticket_data&&ticketDetail.ticket_data.t_model=='mlog'">
{{ ticketDetail.material_in_name }}
</el-descriptions-item>
<el-descriptions-item label="输出物料:" :column="3" v-if="ticketDetail.ticket_data&&ticketDetail.ticket_data.t_model=='mlog'">
{{ ticketDetail.material_out_name }}
</el-descriptions-item>
<el-descriptions-item label="处理人:" :column="3" v-if="ticketDetail.ticket_data&&ticketDetail.ticket_data.t_model=='mlog'">
{{ ticketDetail.handle_user_name }}
</el-descriptions-item>
<el-descriptions-item label="检验表单:" :column="3" v-if="ticketDetail.ticket_data&&ticketDetail.ticket_data.t_model=='mlog'">
<el-link :href="ticketDetail.test_file" target="_blank" type="primary" :underline="false">{{ticketDetail.test_file}}</el-link>
<!-- {{ ticketDetail.test_file }} -->
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-card <el-card
@ -665,8 +681,7 @@ export default {
confirmButtonText: "确认", confirmButtonText: "确认",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) }).then(() => {
.then(() => {
if (that.handleTitle === "撤回工单") { if (that.handleTitle === "撤回工单") {
that.$API.wf.ticket.ticketRetreat that.$API.wf.ticket.ticketRetreat
.req(that.ticketId, that.handleForm) .req(that.ticketId, that.handleForm)
@ -707,60 +722,62 @@ export default {
showMoreVisit() { showMoreVisit() {
this.visitShow = true; this.visitShow = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.visitDialog this.$refs.visitDialog.open("show").setData({ id: this.projectId });
.open("show")
.setData({ id: this.projectId });
}); });
}, },
// //
getticketItem() { getticketItem() {
this.mainLoading = true; let that = this;
this.$API.wf.ticket.ticketItem that.mainLoading = true;
.req(this.ticketId) that.$API.wf.ticket.ticketItem.req(that.ticketId).then((res) => {
.then((res) => { that.mainLoading = false;
this.mainLoading = false; that.ticketDetail = res;
this.ticketDetail = res; if(res.ticket_data.t_model&&res.ticket_data.t_model=="mlog"){
if (this.ticketDetail.state_.key == "opl_close") { that.$API.wpm.mlog.item.req(res.ticket_data.t_id).then((res1) => {
// , that.ticketDetail.routepack_name = res1.routepack_name;
this.getCloseDos(); 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;
if (this.ticketDetail.create_by == this.userId) { that.ticketDetail.test_file = res1.test_file;
this.isOwn = true; })
} }
let participant = this.ticketDetail.participant; if (this.ticketDetail.state_.key == "opl_close") {
if ( // ,
participant == this.userId || this.getCloseDos();
participant.indexOf(this.userId) > -1 }
) { //
this.isDuty = true; if (this.ticketDetail.create_by == this.userId) {
} this.isOwn = true;
}) }
.catch((e) => { let participant = this.ticketDetail.participant;
this.mainLoading = false; if (
}); participant == this.userId ||
participant.indexOf(this.userId) > -1
) {
this.isDuty = true;
}
}).catch((e) => {
this.mainLoading = false;
});
}, },
// //
getBtns() { getBtns() {
let that = this; let that = this;
that.audit_imgs_show = false; that.audit_imgs_show = false;
that.$API.wf.ticket.ticketTransitions that.$API.wf.ticket.ticketTransitions.req(that.ticketId).then((res) => {
.req(that.ticketId) that.operationBtn = res;
.then((res) => { console.log("operationBtn", that.operationBtn);
that.operationBtn = res; if(res.length>0){
console.log("operationBtn", that.operationBtn); for (let i = 0; i < res.length; i++) {
if(res.length>0){ if(res[i].on_submit_func=="apps.opm.services.check_opl_audit_imgs"){
for (let i = 0; i < res.length; i++) { that.audit_imgs_show = true;
if(res[i].on_submit_func=="apps.opm.services.check_opl_audit_imgs"){ }
that.audit_imgs_show = true; if(res[i].on_submit_func=="apps.opm.services.check_opl_work_imgs"){
} that.audit_work_show = true;
if(res[i].on_submit_func=="apps.opm.services.check_opl_work_imgs"){
that.audit_work_show = true;
}
} }
} }
}
}); });
}, },
//访 //访
getVisit() { getVisit() {
@ -848,15 +865,13 @@ export default {
this.userName = data.name; this.userName = data.name;
}, },
deliverNodeHandler() { deliverNodeHandler() {
this.$API.wf.ticket.ticketDeliver this.$API.wf.ticket.ticketDeliver.req(this.ticketId, this.deliverForm).then((res) => {
.req(this.ticketId, this.deliverForm) if (res.err_msg) {
.then((res) => { } else {
if (res.err_msg) { this.limitedDeliver = false;
} else { this.$router.push("dutywork");
this.limitedDeliver = false; }
this.$router.push("dutywork"); });
}
});
}, },
//-end //-end
// //
@ -879,18 +894,15 @@ export default {
return; return;
} }
} }
this.$API.wf.ticket.ticketHandle this.$API.wf.ticket.ticketHandle.req(this.ticketId, params).then((res) => {
.req(this.ticketId, params) if (res.err_msg) {
.then((res) => { } else {
if (res.err_msg) { this.$router.push("dutywork");
} else {
this.$router.push("dutywork");
this.submitLoading = false;
}
})
.catch((e) => {
this.submitLoading = false; this.submitLoading = false;
}); }
}).catch((e) => {
this.submitLoading = false;
});
}, },
reStart() { reStart() {
this.$API.wf.ticket.retryScript.req(this.ticketId).then((res) => { this.$API.wf.ticket.retryScript.req(this.ticketId).then((res) => {

View File

@ -610,6 +610,7 @@ export default {
that.$API.wf.ticket.create.req(ticket).then((res) => { that.$API.wf.ticket.create.req(ticket).then((res) => {
that.isSaveing = false; that.isSaveing = false;
that.ticketDialog = false; that.ticketDialog = false;
that.visible = false;
that.$message.success("提交成功"); that.$message.success("提交成功");
}).catch((e) => { }).catch((e) => {
that.isSaveing = false; that.isSaveing = false;
@ -628,7 +629,10 @@ export default {
console.log('res',res); console.log('res',res);
this.test_file = res.path; this.test_file = res.path;
}, },
handleEditSuccess() {}, //
handleEditSuccess() {
this.getMlogItem();
},
// //
setFilters(filters) { setFilters(filters) {
this.selectionFilters = filters; this.selectionFilters = filters;

View File

@ -72,6 +72,11 @@
prop="handle_user_name" prop="handle_user_name"
width="80" width="80"
></el-table-column> ></el-table-column>
<el-table-column label="保温剩余时间" v-if="mgroupName=='黑化'||mgroupName=='退火'">
<template #default="scope">
{{ getRemaTime(scope.row) }}
</template>
</el-table-column>
<el-table-column <el-table-column
label="开始时间" label="开始时间"
prop="work_start_time" prop="work_start_time"
@ -208,6 +213,29 @@ export default {
}); });
}, },
methods: { methods: {
getRemaTime(row){
if(row.work_start_time !== null){
let times = 0;
let nowTime = new Date().getTime();
let startTiem = new Date(row.work_start_time).getTime();
console.log('nowTime',nowTime)
console.log('startTiem',startTiem)
let remaTime = nowTime - startTiem;
console.log('remaTime',remaTime)
let temp = Math.floor(remaTime/1000*60);
console.log('temp',temp)
if(remaTime>0&&row.reminder_interval_list[0]){
if(temp<row.reminder_interval_list[0]){
times = row.reminder_interval_list[0]-temp;
}else{
return '/';
}
return times
}else{
return '/';
}
}
},
detailClose() { detailClose() {
this.dialog.detail = false; this.dialog.detail = false;
this.$refs.table.refresh(); this.$refs.table.refresh();