fix:新增返工日志
This commit is contained in:
parent
724865e1d6
commit
5320813c4b
|
@ -10,13 +10,13 @@
|
||||||
<div>
|
<div>
|
||||||
<el-card style="width: 100%" header="基本信息" shadow="never">
|
<el-card style="width: 100%" header="基本信息" shadow="never">
|
||||||
<el-descriptions>
|
<el-descriptions>
|
||||||
<el-descriptions-item label="工艺路线">{{
|
<el-descriptions-item label="工艺路线" v-if="!mlogItem.is_fix">{{
|
||||||
mlogItem.routepack_name
|
mlogItem.routepack_name
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="输入物料">{{
|
<el-descriptions-item label="输入物料" v-if="!mlogItem.is_fix">{{
|
||||||
mlogItem.material_in_name
|
mlogItem.material_in_name
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="输出物料">{{
|
<el-descriptions-item label="输出物料" v-if="!mlogItem.is_fix">{{
|
||||||
mlogItem.material_out_name
|
mlogItem.material_out_name
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="工段名称">{{
|
<el-descriptions-item label="工段名称">{{
|
||||||
|
@ -251,17 +251,6 @@
|
||||||
hidePagination
|
hidePagination
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<!-- <el-table-column type="expand">
|
|
||||||
<template #default="props">
|
|
||||||
<div style="padding-left: 50px">
|
|
||||||
<el-descriptions :column="4">
|
|
||||||
<el-descriptions-item label="破损">
|
|
||||||
{{props.row.count_n_hs}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="产出物料"
|
label="产出物料"
|
||||||
prop="material_out_name"
|
prop="material_out_name"
|
||||||
|
@ -300,7 +289,7 @@
|
||||||
<el-link
|
<el-link
|
||||||
:underline="false"
|
:underline="false"
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mlogItem.material_out_&&mlogItem.material_out_.tracking==20"
|
v-if="mlogItem.material_out_&&mlogItem.material_out_.tracking==20||scope.row.material_out_tracking==20"
|
||||||
@click="table_out_check_single(scope.row,'outs')"
|
@click="table_out_check_single(scope.row,'outs')"
|
||||||
>详情</el-link>
|
>详情</el-link>
|
||||||
</template>
|
</template>
|
||||||
|
@ -336,6 +325,7 @@
|
||||||
ref="saveDialog"
|
ref="saveDialog"
|
||||||
:mlog="mlogId"
|
:mlog="mlogId"
|
||||||
:mgroup="mgroup"
|
:mgroup="mgroup"
|
||||||
|
:isfix = "mlogItem.is_fix"
|
||||||
:routeId ="routeId"
|
:routeId ="routeId"
|
||||||
:tracking="tracking"
|
:tracking="tracking"
|
||||||
:materialIn="materialIn"
|
:materialIn="materialIn"
|
||||||
|
@ -607,7 +597,7 @@ export default {
|
||||||
that.handle_user = that.mlogItem.handle_user;
|
that.handle_user = that.mlogItem.handle_user;
|
||||||
console.log('that.mlogItem',that.mlogItem);
|
console.log('that.mlogItem',that.mlogItem);
|
||||||
that.dialog.check_single = true;
|
that.dialog.check_single = true;
|
||||||
if(row.qct==null){
|
if(row.qct==null&&!that.mlogItem.is_fix){
|
||||||
that.$API.qm.qct.list.req({qctmat__material:row.material_out,page:0}).then((res)=>{
|
that.$API.qm.qct.list.req({qctmat__material:row.material_out,page:0}).then((res)=>{
|
||||||
if(res.length>0){
|
if(res.length>0){
|
||||||
that.qct = res[0].id;
|
that.qct = res[0].id;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
style="padding: 0 10px"
|
style="padding: 0 10px"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="12" :sm="12" :xs="24">
|
<el-col :md="12" :sm="12" :xs="24" v-if="mlogtype!=='rework'">
|
||||||
<el-form-item label="生产类型" prop="mtype">
|
<el-form-item label="生产类型" prop="mtype">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.mtype"
|
v-model="form.mtype"
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="12" :xs="24" v-if="mode=='add'">
|
<el-col :md="12" :sm="12" :xs="24" v-if="mode=='add'&&mlogtype!=='rework'">
|
||||||
<el-form-item label="关联任务" prop="mtask">
|
<el-form-item label="关联任务" prop="mtask">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.mtask"
|
v-model="form.mtask"
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="12" :xs="24">
|
<el-col :md="12" :sm="12" :xs="24" v-if="mlogtype!=='rework'">
|
||||||
<el-form-item label="工艺路线">
|
<el-form-item label="工艺路线">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.route"
|
v-model="form.route"
|
||||||
|
@ -246,6 +246,7 @@ const defaultForm = {
|
||||||
mgroup:'',
|
mgroup:'',
|
||||||
mtask:'',
|
mtask:'',
|
||||||
oinfo_json:{},
|
oinfo_json:{},
|
||||||
|
is_fix:false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -322,6 +323,7 @@ export default {
|
||||||
{ id: 10, name: "自产" },
|
{ id: 10, name: "自产" },
|
||||||
{ id: 20, name: "外协" },
|
{ id: 20, name: "外协" },
|
||||||
],
|
],
|
||||||
|
mlogtype:"",
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
options: [],
|
options: [],
|
||||||
|
@ -400,9 +402,14 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//显示
|
//显示
|
||||||
open(mode = "add") {
|
open(mode = "add",type) {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
if(type!==''&&type!==undefined&&type!==null){
|
||||||
|
this.mlogtype = type;
|
||||||
|
this.form.mtype=10;
|
||||||
|
this.form.is_fix=true;
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
//表单注入数据
|
//表单注入数据
|
||||||
|
@ -422,8 +429,8 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
that.testitems.forEach((item) => {
|
that.testitems.forEach((item) => {
|
||||||
item.value = data.oinfo_json[item.id];
|
item.value = data.oinfo_json[item.id];
|
||||||
});
|
});
|
||||||
},500)
|
},500)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
label-width="80px"
|
label-width="80px"
|
||||||
style="padding: 0 10px"
|
style="padding: 0 10px"
|
||||||
>
|
>
|
||||||
<el-form-item label="关联任务">
|
<el-form-item label="关联任务" v-if="!isfix">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.mtask"
|
v-model="form.mtask"
|
||||||
placeholder="关联任务"
|
placeholder="关联任务"
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
<el-form-item label="使用数量" prop="count_use">
|
<el-form-item label="使用数量" prop="count_use">
|
||||||
<el-input-number ref="codeInput" v-model="form.count_use" clearable></el-input-number>
|
<el-input-number ref="codeInput" v-model="form.count_use" clearable></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="主要批次">
|
<el-form-item label="主要批次" v-if="!isfix">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.parent"
|
v-model="form.parent"
|
||||||
placeholder="主要批次"
|
placeholder="主要批次"
|
||||||
|
@ -98,6 +98,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
isfix:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
data() {
|
data() {
|
||||||
|
@ -186,12 +190,15 @@ export default {
|
||||||
//获取车间物料
|
//获取车间物料
|
||||||
getMaterial() {
|
getMaterial() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$API.wpm.wmaterial.list.req({
|
let obj = {};
|
||||||
mtaskx: that.form.mtask,
|
obj.mtaskx =that.form.mtask;
|
||||||
mgroupx: that.mgroup,
|
obj.mgroupx =that.mgroup;
|
||||||
route: that.routeId,
|
obj.route =that.routeId;
|
||||||
page: 0,
|
obj.page =0;
|
||||||
}).then((res) => {
|
if(that.isfix){
|
||||||
|
obj.state =30;
|
||||||
|
}
|
||||||
|
this.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
||||||
that.materialOptions = res;
|
that.materialOptions = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -492,9 +492,11 @@ export default {
|
||||||
},
|
},
|
||||||
getOptions(){
|
getOptions(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.wpr.list.req({wm:that.wm,page:0}).then((res) => {
|
if(that.mode == 'ins'){//输入
|
||||||
that.options = res;
|
that.$API.wpm.wpr.list.req({wm:that.wm,page:0}).then((res) => {
|
||||||
})
|
that.options = res;
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
optionChange(row){
|
optionChange(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -9,7 +9,15 @@
|
||||||
v-auth="'mlog.create'"
|
v-auth="'mlog.create'"
|
||||||
>新增</el-button
|
>新增</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="table_rework"
|
||||||
|
v-auth="'mlog.create'"
|
||||||
|
>返工</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-input
|
<el-input
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px"
|
||||||
|
@ -267,11 +275,22 @@ export default {
|
||||||
this.$refs.saveDialog.open("add");
|
this.$refs.saveDialog.open("add");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
table_rework(){
|
||||||
|
this.dialog.save = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open("add","rework");
|
||||||
|
});
|
||||||
|
},
|
||||||
//编辑日志
|
//编辑日志
|
||||||
table_edit(row) {
|
table_edit(row) {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.saveDialog.open("edit").setData(row);
|
if(row.is_fix){
|
||||||
|
this.$refs.saveDialog.open("edit","rework").setData(row);
|
||||||
|
}else{
|
||||||
|
this.$refs.saveDialog.open("edit").setData(row);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//日志详情
|
//日志详情
|
||||||
|
|
Loading…
Reference in New Issue