fix:光芯入库第一次检验

This commit is contained in:
shijing 2025-12-16 14:02:05 +08:00
parent beabebaadc
commit fb6785654e
1 changed files with 42 additions and 10 deletions

View File

@ -605,12 +605,21 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item <el-form-item v-if="project_code === 'gx'" label="总数">
:label="project_code === 'gx'? '总数': '总袋(桶)数'" <el-input-number
v-model="form.count"
:min="0"
disabled="true"
style="width: 100%"
controls-position="right"
> >
</el-input-number>
</el-form-item>
<el-form-item v-if="project_code === 'gz'" label="总袋(桶)数">
<el-input-number <el-input-number
v-model="form.count_bag" v-model="form.count_bag"
:min="0" :min="0"
disabled="true"
style="width: 100%" style="width: 100%"
controls-position="right" controls-position="right"
> >
@ -618,7 +627,14 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="抽样数量"> <el-form-item label="不合格数量" v-if="project_code === 'gx'&&type == 'pur_in'">
<el-input
disabled
v-model="form.count_notok"
placeholder="不合格数量"
/>
</el-form-item>
<el-form-item label="抽样数量" v-else>
<!-- 光芯 --> <!-- 光芯 -->
<el-input-number <el-input-number
v-if="project_code === 'gx'" v-if="project_code === 'gx'"
@ -666,7 +682,17 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="检验合格" prop="is_testok"> <el-form-item label="崩边" v-if="project_code === 'gx'&&type == 'pur_in'">
<el-input-number
v-model="form.count_n_qt"
:min="0"
style="width: 100%"
controls-position="right"
@change="nqtChange"
>
</el-input-number>
</el-form-item>
<el-form-item label="检验合格" prop="is_testok" v-else>
<el-select <el-select
v-model="form.is_testok" v-model="form.is_testok"
placeholder="检验合格" placeholder="检验合格"
@ -985,6 +1011,7 @@ export default {
console.log("objitem", that.objitem); console.log("objitem", that.objitem);
that.form.material_name = that.objitem.material_name; that.form.material_name = that.objitem.material_name;
that.form.batch = that.objitem.batch; that.form.batch = that.objitem.batch;
that.form.count = that.objitem.count;
that.form.count_bag = that.objitem.count_bag; that.form.count_bag = that.objitem.count_bag;
} }
if ( if (
@ -1070,6 +1097,9 @@ export default {
} }
return this; return this;
}, },
nqtChange(){
this.form.count_notok = this.form.count_n_qt;
},
getMaterialItem(){ getMaterialItem(){
let that = this; let that = this;
that.$API.mtm.material.item.req(that.objitem.material).then(()=>{ that.$API.mtm.material.item.req(that.objitem.material).then(()=>{
@ -1325,13 +1355,15 @@ export default {
if (valid) { if (valid) {
that.isSaveing = true; that.isSaveing = true;
try { try {
if (that.type == "pur_in") { if (that.type == "pur_in"&&that.project_code!="gx") {
console.log(that.form); console.log(that.form);
let arr = []; let arr = [];
if(that.weight_kgs.length>0){
that.weight_kgs.forEach((item) => { that.weight_kgs.forEach((item) => {
arr.push(item.value); arr.push(item.value);
}); });
that.form.weight_kgs = arr; that.form.weight_kgs = arr;
}
console.log('that.form',that.form); console.log('that.form',that.form);
that.$API.inm.mioitem.testpurin that.$API.inm.mioitem.testpurin
.req(that.mioitemId, that.form) .req(that.mioitemId, that.form)