fix:黑化检验增加检验记录

This commit is contained in:
shijing 2025-08-05 13:57:53 +08:00
parent 61ccbb2e78
commit 0dae17ca66
2 changed files with 197 additions and 2 deletions

View File

@ -0,0 +1,187 @@
<template>
<el-container>
<el-header>
<div class="left-panel"></div>
<div class="right-panel">
<el-select
v-model="query.type2"
clearable
style="width: 120px; margin-left: 2px"
placeholder="状态"
@change="handleQuery"
>
<el-option
v-for="item in typeOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-input
v-model="query.batch"
placeholder="编号"
clearable
style="margin-right: 5px"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:params="params"
>
<el-table-column label="检验类型">
<template #default="scope">
<el-tag v-if="scope.row.type2 == 10">
{{ type2_[scope.row.type2] }}
</el-tag>
<el-tag v-else type="success">
{{ type2_[scope.row.type2] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="物料名称" prop="material_name">
</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="检验数">
<template #default="scope">
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling }}</span>
<span v-else>{{ scope.row.count }}</span>
</template>
</el-table-column>
<el-table-column label="合格数">
<template #default="scope">
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling_ok }}</span>
<span v-else>{{ scope.row.count_ok }}</span>
</template>
</el-table-column>
<el-table-column label="不合格数" prop="count_notok">
</el-table-column>
<el-table-column label="合格率">
<template #default="scope">
<span v-if="scope.row.type2 == 10">{{ scope.row.count_sampling_ok/scope.row.count_sampling*100 }}%</span>
<span v-else>{{ scope.row.count_ok/scope.row.count*100 }}%</span>
</template>
</el-table-column>
<el-table-column label="检验日期" prop="test_date">
</el-table-column>
<el-table-column label="检验人" prop="test_user_name">
</el-table-column>
</scTable>
</el-main>
</el-container>
</template>
<script>
export default {
name: "mio",
props: {
deptId: {
type: String,
default: "",
},
mgroupId: {
type: String,
default: "",
},
mgroupName: {
type: String,
default: "",
},
processId: {
type: String,
default: "",
},
mgroupcode: {
type: String,
default: "",
},
},
data() {
return {
type2_: {
10: "抽检",
20: "全检",
},
typeOptions:[
{id:10,name:"抽检"},
{id:20,name:"全检"},
],
query:{},
params: {
type:'process',
material__process__name: this.mgroupName,
},
apiObj: this.$API.qm.ftestwork.list,
type: "",
};
},
methods: {
//
table_detail(row) {
let that = this;
that.cate_type=row.type;
that.dialog.inmRecord = true;
that.$nextTick(() => {
that.$refs.inmRecordDialog.open("show").setData(row,row.type);
});
},
//
revert(row) {
this.$confirm(`确定撤销该操作吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.inm.mio.revert.req(row.id).then((res) => {
this.$message.success("撤销成功");
this.$refs.table.refresh();
return res;
})
.catch((err) => {
return err;
});
}).catch(() => {});
},
//
table_del(row) {
this.$confirm(`确定删除吗?`, "提示", {
type: "warning",
})
.then(() => {
this.$API.inm.mio.delete
.req(row.id)
.then((res) => {
this.$message.success("删除成功");
this.$refs.table.refresh();
return res;
})
.catch((err) => {
return err;
});
})
.catch(() => {});
},
handleQuery() {
this.$refs.table.queryData(this.query);
},
resetQuery() {
this.query = {};
},
handleinmSuccess(){
this.$refs.table.refresh();
},
},
};
</script>

View File

@ -61,6 +61,13 @@
:processId="processId"
:mgroupcode="mgroup_code"
></record>
<check v-else-if="values == '检验记录'&&mgroupName=='黑化'"
:mgroupId="mgroupId"
:deptId = "mgroupDept"
:mgroupName="mgroupName"
:processId="processId"
:mgroupcode="mgroup_code"
></check>
<helpso v-else-if="values == '辅料'"
:mgroupId="mgroupId"
:deptId = "mgroupDept"
@ -78,15 +85,16 @@ import mlogs from "./mlogs.vue";
import mtask from "./mtask.vue";
import handover from "./handover.vue";
import record from "./inmrecord.vue";
import check from "./checkrecord.vue";
import helpso from "./helpso.vue";
export default {
name: "bx",
components: { inm, inmOut,mlogs, mtask, handover,record,helpso },
components: { inm, inmOut,mlogs, mtask, handover,record,helpso,check },
data() {
return {
mgroups:[],
tableHieght: 200,
options: ["日志", "交接记录", "来料未完成","出料已完成","出入库记录",'辅料'],
options: ["日志", "交接记录", "来料未完成","出料已完成","出入库记录","检验记录",'辅料'],
values: "日志",
mgroupName: "",
mgroupId: "",