- 打印
+
{{
mlogItem.routepack_name
@@ -40,17 +40,11 @@
{{
mlogItem.create_time
}}
-
- {{act_states[mlogItem.ticket_.act_state]}}
-
-
- {{mlogItem.test_file}}
-
提交
-
- 放行审批
@@ -326,90 +313,6 @@
@closed="dialog.edit = false"
>
-
-
-
-
-
-
-
-
-
-
-
- min
-
-
-
-
-
- °C
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- :退火后直径23.5±0.2;黑圈内径:5.9±0.1;外径7.6-7.77
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
@@ -478,22 +381,6 @@ export default {
count_use: 0,
count_pn_jgqbl: 0,
},
- oinfo_json:{
- 退火炉号:'',
- 退火时间:'',
- 退火温度:'',
- 抽检结果:'',
- 抽检数:'',
- 强度落球:'',
- },
- act_states: {
- 0: "草稿中",
- 1: "进行中",
- 2: "被退回",
- 3: "被撤回",
- 4: "已完成",
- 5: "已关闭",
- },
fileList:[],
tableDataWm:[],
test_file:'',
@@ -504,7 +391,6 @@ export default {
tableData:[],
tableData2:[],
saveInDialog: false,
- ticketDialog:false,
printVisible:false,
setFiltersVisible: false,
rules: {
@@ -523,17 +409,14 @@ export default {
};
},
mounted() {
- console.log('this.mlogId',this.mlogId);
let that = this;
this.paramsIn.mlog = this.mlogId;
this.paramsOut.mlog = this.mlogId;
this.apiObj = this.$API.wpm.mlogb.list;
- this.getInit();
that.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => {
that.tableData = res;
})
that.getMlogItem();
-
},
methods: {
open() {
@@ -576,15 +459,16 @@ 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(() => {
this.$refs.saveDialog.open();
});
},
+ mlogbinSuccess(){
+ this.$refs.tableIn.refresh();
+ this.$refs.tableOut.refresh();
+ },
//自检
table_in_edit(row) {
this.saveInForm = row;
@@ -644,50 +528,6 @@ 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;
- });
- });
- },
handleSaveSuccess() {
this.$refs.tableIn.refresh();
this.$refs.tableOut.refresh();
diff --git a/src/views/wpm_bx/mlog_form.vue b/src/views/wpm_bx/mlog_form.vue
index 87c6030e..b42732a7 100644
--- a/src/views/wpm_bx/mlog_form.vue
+++ b/src/views/wpm_bx/mlog_form.vue
@@ -58,14 +58,33 @@
-
+
+
+
+
+
+
+
+
+
- {{ item.routepack_name }}-{{
- item.process_name
- }}
+ {{ item.routepack_name }}-{{item.process_name}}
@@ -104,18 +119,6 @@
-
-
-
-
-
-
-
- (min)
-
-
-
-
- (min)
-
-
-
-
-
-
-
-
-
-
-
{
+ that.mtaskOptions = res;
+ });
+ },
getSupplier() {
let that = this;
let obj = {};
@@ -367,6 +345,14 @@ export default {
}
this.getRoute(data.id);
},
+ changeMtask(){
+ let that = this;
+ that.mtaskOptions.forEach((item) => {
+ if(item.id == that.form.mtask){
+ that.form.route = item.route;
+ }
+ })
+ },
fileUPSuccess(res) {
let that = this;
console.log('res',res);
@@ -393,7 +379,7 @@ export default {
obj.work_end_time = that.form.work_end_time;
obj.handle_user = that.form.handle_user;
obj.note = that.form.note;
- if(that.mgroup_name=='黑化'){
+ if(that.mgroupName=='黑化'){
that.form.test_file = that.test_file;
}
that.$API.wpm.mlog.change.req(that.form.id, that.form).then((res) => {
diff --git a/src/views/wpm_bx/mlogb_form.vue b/src/views/wpm_bx/mlogb_form.vue
index d2700323..9c98e7bf 100644
--- a/src/views/wpm_bx/mlogb_form.vue
+++ b/src/views/wpm_bx/mlogb_form.vue
@@ -34,7 +34,8 @@
-
+
- 保存
+ 保存
取消
@@ -85,9 +74,8 @@ const defaultForm = {
mlog: "",
mtask: "",
batch: "",
- count_use: "",
+ count_use: 1,
};
-
export default {
props: {
mlog: {
@@ -131,6 +119,7 @@ export default {
},
],
},
+ wm_in:'',
options: [],
materialOptions: [],
visible: false,
@@ -168,24 +157,28 @@ export default {
that.materialOptions = res;
});
},
+ //扫描后处理方法
+ formWminChange(){
+ //根据扫描内容获取输入物料
+ this.materialOptions.forEach((item) => {
+ if (item.batch == this.wm_in) {
+ this.form.wm_in = item.id;
+ //提交
+ this.submit();
+ }
+ });
+ },
//表单提交方法
submit() {
let that = this;
that.$refs.dialogForm.validate(async (valid) => {
if (valid) {
- that.isSaveing = true;
that.form.mlog = that.mlog;
- that.$API.wpm.mlogb.in
- .req(that.form)
- .then((res) => {
- that.isSaveing = false;
- that.$emit("success");
- that.visible = false;
- that.$message.success("操作成功");
- })
- .catch((err) => {
- that.isSaveing = false;
- });
+ that.$API.wpm.mlogb.in.req(that.form).then((res) => {
+ that.$emit("mlogbinSuccess");
+ that.$message.success("添加成功");
+ }).catch((err) => {
+ });
}
});
},