feat:物料表单新增入库检验方式,入库明细未检免检物料显示免检标识;fix:其他配置页提交未实现导致保存无效

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
caoqianming 2026-07-22 16:27:41 +08:00
parent 3ee5403ad9
commit f7fee89290
4 changed files with 41 additions and 6 deletions

View File

@ -149,8 +149,9 @@
</el-table-column> </el-table-column>
<el-table-column label="检验提交" prop="count_tested" v-if="cate=='mainso'&&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"> <el-table-column label="检验提交" prop="count_tested" v-if="cate=='mainso'&&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')">
<template #default="scope"> <template #default="scope">
<el-tag v-if="scope.row.test_date == null" type="warning"></el-tag> <el-tag v-if="scope.row.test_date !== null" type="success"></el-tag>
<el-tag v-else type="success"></el-tag> <el-tag v-else-if="scope.row.material_&&scope.row.material_.test_mode_in==10" type="info">免检</el-tag>
<el-tag v-else type="warning"></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="不合格数量" prop="count_notok" v-if="cate!=='helpso'"> <el-table-column label="不合格数量" prop="count_notok" v-if="cate!=='helpso'">

View File

@ -132,6 +132,18 @@
<el-switch v-model="form.is_hidden" /> <el-switch v-model="form.is_hidden" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24">
<el-form-item label="入库检验方式" prop="test_mode_in">
<el-select
v-model="form.test_mode_in"
placeholder="入库检验方式"
style="width: 100%"
>
<el-option label="免检" :value="10"></el-option>
<el-option label="必检" :value="20"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="安全库存下限" prop="count_safe"> <el-form-item label="安全库存下限" prop="count_safe">
<el-input-number <el-input-number
@ -231,7 +243,7 @@ export default {
show: "查看物料", show: "查看物料",
}, },
brothers: [], brothers: [],
form: {}, form: { test_mode_in: 20 },
rules: { rules: {
name: [ name: [
{ {

View File

@ -157,6 +157,18 @@
<el-switch v-model="form.is_hidden" /> <el-switch v-model="form.is_hidden" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24">
<el-form-item label="入库检验方式" prop="test_mode_in">
<el-select
v-model="form.test_mode_in"
placeholder="入库检验方式"
style="width: 100%"
>
<el-option label="免检" :value="10"></el-option>
<el-option label="必检" :value="20"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="form.type == 40"> <el-col :md="12" :sm="24" v-if="form.type == 40">
<el-form-item label="是否进入车间库存"> <el-form-item label="是否进入车间库存">
<el-switch v-model="form.into_wm" /> <el-switch v-model="form.into_wm" />
@ -207,7 +219,7 @@ export default {
edit: "编辑物料", edit: "编辑物料",
show: "查看物料", show: "查看物料",
}, },
form: {}, form: { test_mode_in: 20 },
rules: { rules: {
name: [ name: [
{ {
@ -353,6 +365,7 @@ export default {
that.form.unit = data.unit; that.form.unit = data.unit;
that.form.process = data.process; that.form.process = data.process;
that.form.tracking = data.tracking; that.form.tracking = data.tracking;
that.form.test_mode_in = data.test_mode_in;
that.form.count_safe = data.count_safe; that.form.count_safe = data.count_safe;
that.form.count_safe_upper = data.count_safe_upper; that.form.count_safe_upper = data.count_safe_upper;
that.form.is_hidden = data.is_hidden; that.form.is_hidden = data.is_hidden;

View File

@ -6,7 +6,7 @@
label-width="auto" label-width="auto"
style="margin-top: 20px" style="margin-top: 20px"
> >
<el-form-item label="领料时校验是否检验"> <el-form-item label="领料时校验是否检验(总开关,物料可单独设为免检)">
<el-switch v-model="form.mes.check_test_when_do_out"></el-switch> <el-switch v-model="form.mes.check_test_when_do_out"></el-switch>
</el-form-item> </el-form-item>
<el-divider /> <el-divider />
@ -51,7 +51,16 @@ export default {
}) })
}, },
submitForm() { submitForm() {
this.saveLoading = true;
this.$API.system.config.updateInfo.req({
mes: this.form.mes,
sms: this.form.sms
}).then(() => {
this.$message.success("保存成功");
this.saveLoading = false;
}).catch(() => {
this.saveLoading = false;
})
} }
} }
} }