fix:新增返工日志

This commit is contained in:
shijing 2025-02-24 17:54:20 +08:00
parent 724865e1d6
commit 5320813c4b
5 changed files with 59 additions and 34 deletions

View File

@ -10,13 +10,13 @@
<div>
<el-card style="width: 100%" header="基本信息" shadow="never">
<el-descriptions>
<el-descriptions-item label="工艺路线">{{
<el-descriptions-item label="工艺路线" v-if="!mlogItem.is_fix">{{
mlogItem.routepack_name
}}</el-descriptions-item>
<el-descriptions-item label="输入物料">{{
<el-descriptions-item label="输入物料" v-if="!mlogItem.is_fix">{{
mlogItem.material_in_name
}}</el-descriptions-item>
<el-descriptions-item label="输出物料">{{
<el-descriptions-item label="输出物料" v-if="!mlogItem.is_fix">{{
mlogItem.material_out_name
}}</el-descriptions-item>
<el-descriptions-item label="工段名称">{{
@ -251,17 +251,6 @@
hidePagination
>
<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
label="产出物料"
prop="material_out_name"
@ -300,7 +289,7 @@
<el-link
:underline="false"
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')"
>详情</el-link>
</template>
@ -336,6 +325,7 @@
ref="saveDialog"
:mlog="mlogId"
:mgroup="mgroup"
:isfix = "mlogItem.is_fix"
:routeId ="routeId"
:tracking="tracking"
:materialIn="materialIn"
@ -607,7 +597,7 @@ export default {
that.handle_user = that.mlogItem.handle_user;
console.log('that.mlogItem',that.mlogItem);
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)=>{
if(res.length>0){
that.qct = res[0].id;

View File

@ -17,7 +17,7 @@
style="padding: 0 10px"
>
<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-select
v-model="form.mtype"
@ -57,7 +57,7 @@
</el-select>
</el-form-item>
</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-select
v-model="form.mtask"
@ -76,7 +76,7 @@
</el-select>
</el-form-item>
</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-select
v-model="form.route"
@ -246,6 +246,7 @@ const defaultForm = {
mgroup:'',
mtask:'',
oinfo_json:{},
is_fix:false,
};
export default {
@ -322,6 +323,7 @@ export default {
{ id: 10, name: "自产" },
{ id: 20, name: "外协" },
],
mlogtype:"",
visible: false,
isSaveing: false,
options: [],
@ -400,9 +402,14 @@ export default {
});
},
//
open(mode = "add") {
open(mode = "add",type) {
this.mode = mode;
this.visible = true;
if(type!==''&&type!==undefined&&type!==null){
this.mlogtype = type;
this.form.mtype=10;
this.form.is_fix=true;
}
return this;
},
//

View File

@ -17,7 +17,7 @@
label-width="80px"
style="padding: 0 10px"
>
<el-form-item label="关联任务">
<el-form-item label="关联任务" v-if="!isfix">
<el-select
v-model="form.mtask"
placeholder="关联任务"
@ -40,7 +40,7 @@
<el-form-item label="使用数量" prop="count_use">
<el-input-number ref="codeInput" v-model="form.count_use" clearable></el-input-number>
</el-form-item>
<el-form-item label="主要批次">
<el-form-item label="主要批次" v-if="!isfix">
<el-select
v-model="form.parent"
placeholder="主要批次"
@ -98,6 +98,10 @@ export default {
type: String,
default: "",
},
isfix:{
type: Boolean,
default: false,
}
},
emits: ["success", "closed"],
data() {
@ -186,12 +190,15 @@ export default {
//
getMaterial() {
let that = this;
this.$API.wpm.wmaterial.list.req({
mtaskx: that.form.mtask,
mgroupx: that.mgroup,
route: that.routeId,
page: 0,
}).then((res) => {
let obj = {};
obj.mtaskx =that.form.mtask;
obj.mgroupx =that.mgroup;
obj.route =that.routeId;
obj.page =0;
if(that.isfix){
obj.state =30;
}
this.$API.wpm.wmaterial.list.req(obj).then((res) => {
that.materialOptions = res;
});
},

View File

@ -492,9 +492,11 @@ export default {
},
getOptions(){
let that = this;
if(that.mode == 'ins'){//
that.$API.wpm.wpr.list.req({wm:that.wm,page:0}).then((res) => {
that.options = res;
})
}
},
optionChange(row){
let that = this;

View File

@ -9,7 +9,15 @@
v-auth="'mlog.create'"
>新增</el-button
>
<el-button
type="primary"
icon="el-icon-plus"
@click="table_rework"
v-auth="'mlog.create'"
>返工</el-button
>
</div>
<div class="right-panel">
<el-input
style="margin-right: 5px"
@ -267,11 +275,22 @@ export default {
this.$refs.saveDialog.open("add");
});
},
table_rework(){
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add","rework");
});
},
//
table_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
if(row.is_fix){
this.$refs.saveDialog.open("edit","rework").setData(row);
}else{
this.$refs.saveDialog.open("edit").setData(row);
}
});
},
//