fix:光芯自检添加不合格项”小崩边“

This commit is contained in:
shijing 2024-08-27 11:05:57 +08:00
parent c86ab8411e
commit 97eab5f9a4
1 changed files with 93 additions and 3 deletions

View File

@ -111,6 +111,18 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24">
<el-form-item label="小崩边">
<el-input-number
v-model="form.count_n_xbb"
:min="0"
class="width-100"
controls-position="right"
@change="countChange"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="麻点"> <el-form-item label="麻点">
<el-input-number <el-input-number
@ -144,6 +156,17 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :md="12" :sm="24">
<el-form-item label="棕圈">
<el-input-number
v-model="form.count_n_zq"
:min="0"
class="width-100"
controls-position="right"
@change="countChange"
/>
</el-form-item>
</el-col> -->
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="其他"> <el-form-item label="其他">
<el-input-number <el-input-number
@ -156,6 +179,49 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>
<el-col :span="24">
<el-form-item label="前道不良">
<el-button
type="primary"
icon="el-icon-plus"
@click="notok_add"
></el-button>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-bottom:10px" v-for="(item, $index) in notokList" :key="item">
<el-col :span="10">
<el-select v-model="item.file"
style="width:90%"
placeholder="请选择不合格项">
<el-option
v-for="notok in notokOptions"
:key="notok.value"
:label="notok.name"
:value="notok.value"
>
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-input-number
style="width:90%"
v-model="item.value"
:min="0"
class="width-100"
controls-position="right"
@change="countChange"
/>
</el-col>
<el-col :span="2">
<el-button
type="danger"
icon="el-icon-delete"
@click="notok_del( $index)"
></el-button>
</el-col>
</el-row> -->
</el-form> </el-form>
</el-main> </el-main>
<el-footer> <el-footer>
@ -184,12 +250,27 @@ export default {
count_n_qp: 0, count_n_qp: 0,
count_n_swen: 0, count_n_swen: 0,
count_n_bb: 0, count_n_bb: 0,
count_n_xbb:0,
count_n_md: 0, count_n_md: 0,
count_n_xh: 0, count_n_xh: 0,
count_n_ps: 0, count_n_ps: 0,
count_n_qt: 0, count_n_qt: 0,
count_n_wm: 0, count_n_wm: 0,
count_n_zq:0
}, },
notokOptions:[
{name:"划伤",value:'count_n_hs'},
{name:"气泡",value:'count_n_qp'},
{name:"水纹",value:'count_n_swen'},
{name:"崩边",value:'count_n_bb'},
{name:"小崩边",value:'count_n_xbb'},
{name:"麻点",value:'count_n_md'},
{name:"划伤",value:'count_n_xh'},
{name:"破损",value:'count_n_ps'},
{name:"其他",value:'count_n_qt'},
{name:"雾面",value:'count_n_wm'},
{name:"棕圈",value:'count_n_zq'},
],
// //
rules: { rules: {
batch: [ batch: [
@ -208,6 +289,7 @@ export default {
], ],
}, },
options: [], options: [],
notokList:[],
materialOptions: [], materialOptions: [],
visible: false, visible: false,
isSaveing: false, isSaveing: false,
@ -225,15 +307,23 @@ export default {
Object.assign(this.form, data); Object.assign(this.form, data);
console.log(this.form); console.log(this.form);
}, },
notok_add(){
this.notokList.push({file:'',value:0});
},
notok_del(index){
this.notokList.splice(index, 1)
},
countChange() { countChange() {
this.form.count_notok = this.form.count_notok =
this.form.count_n_hs + this.form.count_n_hs +
this.form.count_n_qp + this.form.count_n_qp +
this.form.count_n_swen + this.form.count_n_swen +
this.form.count_n_bb + this.form.count_n_bb +
this.form.count_n_xbb +
this.form.count_n_md + this.form.count_n_md +
this.form.count_n_xh + this.form.count_n_xh +
this.form.count_n_ps + this.form.count_n_ps +
this.form.count_n_zq +
this.form.count_n_qt + this.form.count_n_qt +
this.form.count_n_wm; this.form.count_n_wm;
this.form.count_ok = this.form.count_real - this.form.count_notok; this.form.count_ok = this.form.count_real - this.form.count_notok;
@ -250,9 +340,11 @@ export default {
this.form.count_n_qp + this.form.count_n_qp +
this.form.count_n_swen + this.form.count_n_swen +
this.form.count_n_bb + this.form.count_n_bb +
this.form.count_n_xbb +
this.form.count_n_md + this.form.count_n_md +
this.form.count_n_xh + this.form.count_n_xh +
this.form.count_n_ps + this.form.count_n_ps +
this.form.count_n_zq +
this.form.count_n_qt + this.form.count_n_qt +
this.form.count_n_wm; this.form.count_n_wm;
let sum = this.form.count_ok + this.form.count_notok; let sum = this.form.count_ok + this.form.count_notok;
@ -269,9 +361,7 @@ export default {
that.isSaveing = false; that.isSaveing = false;
}); });
} else { } else {
this.$message.error( this.$message.error("使用数量与合格数不合格数数量不对等");
"使用数量与合格数不合格数数量不对等"
);
} }
} }
}); });