fix:退火日志去除审批,退货交接添加审批
This commit is contained in:
parent
0131173d97
commit
cb0c6cfadb
|
|
@ -103,7 +103,7 @@
|
|||
</el-card>
|
||||
<el-card
|
||||
style="margin-top: 4px; position: relative"
|
||||
v-if="cateType === 'rpj'"
|
||||
v-if="cateType == 'rpj'"
|
||||
>
|
||||
<el-descriptions title="入厂项目" :column="3">
|
||||
<el-descriptions-item label="相关方:">
|
||||
|
|
@ -209,6 +209,36 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</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
|
||||
style="margin-top: 4px; position: relative"
|
||||
header="处理日志"
|
||||
|
|
@ -596,6 +626,7 @@ export default {
|
|||
{ id: 40, name: "其他" },
|
||||
],
|
||||
dosOption: [],
|
||||
handoverItem:{},
|
||||
submitLoading: false,
|
||||
userId: this.$TOOL.data.get("USER_INFO").id,
|
||||
isOwn: false,
|
||||
|
|
@ -610,6 +641,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.submitLoading = false;
|
||||
this.getticketItem();
|
||||
if (this.cateType === "visit") {
|
||||
this.getVisit();
|
||||
} else if (this.cateType === "rpj") {
|
||||
|
|
@ -621,7 +653,6 @@ export default {
|
|||
} else if (this.cateType === "opl") {
|
||||
this.getOpl();
|
||||
}
|
||||
this.getticketItem();
|
||||
this.getBtns();
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -741,6 +772,17 @@ export default {
|
|||
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") {
|
||||
// 如果是作业关闭,展示需要提交的表单
|
||||
this.getCloseDos();
|
||||
|
|
|
|||
|
|
@ -176,10 +176,34 @@
|
|||
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
|
||||
</el-form-item>
|
||||
</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-form>
|
||||
<el-footer v-if="mode!=='show'">
|
||||
<el-button type="primary" v-loading="isSaveing" @click="submit">确定</el-button>
|
||||
<el-footer v-show="mode!=='show'">
|
||||
<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-footer>
|
||||
</el-dialog>
|
||||
|
|
@ -237,6 +261,7 @@ export default {
|
|||
recive_mgroup: null,
|
||||
handoverb:[],
|
||||
},
|
||||
initForm:{},
|
||||
selectObjIds:[],
|
||||
apiObjM:null,
|
||||
paramsM:{},
|
||||
|
|
@ -294,7 +319,9 @@ export default {
|
|||
listParams:{},
|
||||
totalCount: 0,
|
||||
deptID:'',
|
||||
route_code:'',
|
||||
codeText: "",
|
||||
fileList:[],
|
||||
userList: [],
|
||||
userList2: [],
|
||||
mgroupOptions: [],
|
||||
|
|
@ -314,6 +341,7 @@ export default {
|
|||
that.materialObj = materialObj;
|
||||
that.form.handle_date = that.form.send_date = this.$TOOL.dateFormat2(new Date());
|
||||
that.form.send_mgroup = that.mgroupId;
|
||||
that.route_code = that.$route.path.split("/")[2];
|
||||
//type 10:正常交接 ;20:返工交接 ;40:报废交接
|
||||
//mtype 10:正常交接 ;20:分批操作 ;30:合批操作
|
||||
//获取交接人员
|
||||
|
|
@ -347,8 +375,19 @@ export default {
|
|||
}else{
|
||||
that.getMgroupOptions();
|
||||
}
|
||||
if(that.route_code=='tuihuo'){
|
||||
that.getInit();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//渲染工单提交按钮
|
||||
getInit() {
|
||||
let that = this;
|
||||
that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
|
||||
that.initForm = res;
|
||||
let transitions = res.transitions;
|
||||
});
|
||||
},
|
||||
//获取工段列表
|
||||
getMgroupOptions() {
|
||||
let that = this;
|
||||
|
|
@ -499,6 +538,30 @@ export default {
|
|||
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() {
|
||||
let that = this;
|
||||
|
|
|
|||
|
|
@ -48,17 +48,14 @@
|
|||
<el-descriptions-item label="结束时间">{{
|
||||
mlogItem.work_end_time
|
||||
}}</el-descriptions-item>
|
||||
<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-descriptions-item label="检验表单" v-if="mlogItem.mgroup_name=='黑化'">
|
||||
<el-link :href="mlogItem.test_file" target="_blank" type="primary" :underline="false">{{mlogItem.test_file}}</el-link>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div style="padding: 5px 10px;display: flex;justify-content: end;">
|
||||
<el-button
|
||||
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"
|
||||
style="margin-right: 10px;"
|
||||
v-auth="'mlog.update'"
|
||||
|
|
@ -67,18 +64,11 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="mlogItem.mgroup_name!='退火'&&mlogItem.submit_time == null"
|
||||
v-if="mlogItem.submit_time == null"
|
||||
:loading="isSaveing"
|
||||
@click="mlogSubmit"
|
||||
>提交</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>
|
||||
</el-card>
|
||||
<!-- 输入物料 -->
|
||||
|
|
@ -311,30 +301,6 @@
|
|||
</el-table-column>
|
||||
</scTable>
|
||||
</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
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
|
|
@ -374,90 +340,6 @@
|
|||
@closed="dialog.edit = false"
|
||||
>
|
||||
</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">
|
||||
<print :baseData="mlogItem" :tableData="tableData" :tableData2="tableData2" type="102" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
|
|
@ -535,14 +417,6 @@ export default {
|
|||
count_use: 0,
|
||||
count_pn_jgqbl: 0,
|
||||
},
|
||||
oinfo_json:{
|
||||
退火炉号:'',
|
||||
退火时间:'',
|
||||
退火温度:'',
|
||||
抽检结果:'',
|
||||
抽检数:'',
|
||||
强度落球:'',
|
||||
},
|
||||
act_states: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
|
|
@ -568,7 +442,7 @@ export default {
|
|||
mlogbdefect:[],
|
||||
mlogboutdefect:[],
|
||||
saveInDialog: false,
|
||||
ticketDialog:false,
|
||||
// ticketDialog:false,
|
||||
printVisible:false,
|
||||
setFiltersVisible: false,
|
||||
rules: {
|
||||
|
|
@ -593,7 +467,7 @@ export default {
|
|||
this.paramsIn.mlog = this.mlogId;
|
||||
this.paramsOut.mlog = this.mlogId;
|
||||
this.apiObj = this.$API.wpm.mlogb.list;
|
||||
this.getInit();
|
||||
// this.getInit();
|
||||
that.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => {
|
||||
that.tableData = res;
|
||||
})
|
||||
|
|
@ -632,7 +506,6 @@ export default {
|
|||
})
|
||||
});
|
||||
},
|
||||
|
||||
getdefects(){
|
||||
let that = this;
|
||||
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() {
|
||||
let that = this;
|
||||
|
|
@ -661,7 +533,6 @@ export default {
|
|||
that.saveInForm.count_pn_jgqbl += that.defectinform[item.defect_name];
|
||||
}
|
||||
})
|
||||
// that.countCellChanges();
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
|
|
@ -675,9 +546,6 @@ export default {
|
|||
this.$refs.editDialog.open("edit").setData(this.mlogItem);
|
||||
});
|
||||
},
|
||||
// mlogUpdate(data) {
|
||||
// this.$refs.editDialog.open().setData(data);
|
||||
// },
|
||||
table_add() {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
|
|
@ -698,7 +566,6 @@ export default {
|
|||
that.saveInDialog = true;
|
||||
}
|
||||
},
|
||||
|
||||
//提交自检
|
||||
saveInSubmit() {
|
||||
let that = this;
|
||||
|
|
@ -752,7 +619,6 @@ export default {
|
|||
that.$refs.checkDialog.open(obj);
|
||||
});
|
||||
},
|
||||
|
||||
//表单提交方法
|
||||
mlogSubmit() {
|
||||
let that = this;
|
||||
|
|
@ -762,50 +628,35 @@ export default {
|
|||
that.$message.success("操作成功");
|
||||
});
|
||||
},
|
||||
//渲染工单提交按钮
|
||||
getInit() {
|
||||
let that = this;
|
||||
that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
|
||||
that.initForm = res;
|
||||
});
|
||||
},
|
||||
//填写退火放行单信息
|
||||
createTicket(){
|
||||
if(this.mlogItem.work_end_time==null){
|
||||
this.$message.error("请先编辑日志并选择结束时间");
|
||||
}else{
|
||||
let sum = 0;
|
||||
this.mlogItem.reminder_interval_list.forEach(item => {
|
||||
sum+=item;
|
||||
});
|
||||
this.oinfo_json.退火时间 = sum;
|
||||
this.oinfo_json.退火炉号 =this.mlogItem.equipment_name!==null?this.mlogItem.equipment_name.split("|")[0]:'';
|
||||
this.ticketDialog = true;
|
||||
}
|
||||
},
|
||||
//提交退火放行单信息,创建工单
|
||||
submitTicketCreate(id) {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
obj.oinfo_json = that.oinfo_json;
|
||||
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;
|
||||
});
|
||||
});
|
||||
},
|
||||
// //渲染工单提交按钮
|
||||
// getInit() {
|
||||
// let that = this;
|
||||
// that.$API.wf.workflow.initkey.req(" backfire").then((res) => {
|
||||
// that.initForm = res;
|
||||
// });
|
||||
// },
|
||||
// //提交退火放行单信息,创建工单
|
||||
// submitTicketCreate(id) {
|
||||
// let that = this;
|
||||
// let obj = {};
|
||||
// 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){
|
||||
this.codeText = codeText;
|
||||
this.dialog.save = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue