fix:光子:六车间中检可以撤回

This commit is contained in:
shijing 2025-02-26 10:30:13 +08:00
parent a3f2e2c0b7
commit 016791b2aa
1 changed files with 27 additions and 8 deletions

View File

@ -15,7 +15,7 @@
stripe
:params="paramsObj"
>
<el-table-column type="expand" v-if="deptName=='6车间'">
<el-table-column type="expand">
<template #default="props">
<el-descriptions title="不合格列表" :column="5" border>
<el-descriptions-item label="划伤" width="150px">
@ -87,7 +87,7 @@
</el-descriptions>
</template>
</el-table-column>
<el-table-column type="expand" v-if="deptName=='7车间'">
<!-- <el-table-column type="expand" v-if="deptName=='7车间'">
<template #default="props">
<el-descriptions title="不合格列表" :column="5" border>
<el-descriptions-item label="炸纹" width="150px">
@ -102,7 +102,6 @@
<el-descriptions-item label="气泡" width="150px">
{{props.row.count_notok_json.count_n_qp}}
</el-descriptions-item>
<el-descriptions-item label="扁" width="150px">
{{props.row.count_notok_json.count_n_b}}
</el-descriptions-item>
@ -111,8 +110,8 @@
</el-descriptions-item>
</el-descriptions>
</template>
</el-table-column>
<el-table-column type="expand" v-if="deptName=='10车间'">
</el-table-column> -->
<!-- <el-table-column type="expand" v-if="deptName=='10车间'">
<template #default="props">
<el-descriptions title="不合格列表" :column="5" border>
<el-descriptions-item label="椭圆/弯曲" width="150px">
@ -141,7 +140,7 @@
</el-descriptions-item>
</el-descriptions>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="检验类型">
<template #default="scope">
<el-tag v-if="scope.row.type2 == 10">
@ -172,14 +171,20 @@
</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>
<span v-if="scope.row.type2 == 10">{{ (scope.row.count_sampling_ok/scope.row.count_sampling*100).toFixed(2) }}%</span>
<span v-else>{{ (scope.row.count_ok/scope.row.count*100).toFixed(2) }}%</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>
<el-table-column label="操作" fixed="right" align="right" width="55">
<template #default="scope">
<el-link type="primary" v-if="scope.row.submit_time==null" @click.stop="testSubmit(scope.row)" v-auth="'ftestwork.submit'">提交</el-link>
<el-link type="warning" v-else @click.stop="testRevoke(scope.row)">撤回</el-link>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
@ -218,6 +223,20 @@ export default {
this.$refs.drawer_table.fetch();
});
},
testSubmit(row) {
let that = this;
that.$API.qm.ftestwork.submit.req(row.id).then((res) => {
that.$message.success("操作成功");
that.$refs.drawer_table.fetch();
})
},
testRevoke(row) {
let that = this;
that.$API.qm.ftestwork.revoke.req(row.id).then((res) => {
that.$message.success("操作成功");
that.$refs.drawer_table.fetch();
})
}
},
};
</script>