fix:检验添加批量操作

This commit is contained in:
shijing 2025-02-21 17:33:47 +08:00
parent cbdc512cee
commit 9a370048ce
3 changed files with 734 additions and 151 deletions

View File

@ -356,6 +356,7 @@
ref="checkDialogSingle"
:mlogb="mlogb"
:wm = "wm"
:mgroup="mgroup"
:isSubmit="isSubmit"
:batchNumber="batchNumber"
:handle_user="handle_user"

View File

@ -7,160 +7,342 @@
@closed="$emit('closed')"
>
<el-container>
<el-header v-if="descriptionVisible">
<div style="display: flex;align-items: center;justify-content: space-between;width: 100%;">
<div>检验人:{{setForm.test_user_name}}</div>
<div>检验设备:{{setForm.equipment_name}}</div>
<div>缺陷项:
<span v-for="(item1,index1) in defectlists" :key="item1.id">{{ item1.defect_name }}
<span v-if="index1 < defectlists.length-1"></span>
</span>
</div>
<div>检测项:
<span v-for="(item2,index2) in testitemlists" :key="item2.id">{{ item2.testitem_name }}
<span v-if="index2 < testitemlists.length-1"></span>
</span>
</div>
</div>
</el-header>
<el-main id="mlogbwMain">
<el-button type="primary" @click="check_start" style="position: absolute;top: 20px;left: 150px;">检验</el-button>
<el-button type="primary" v-if="setForm.equipment!=''" @click="check_set" style="position: absolute;top: 20px;left: 210px;">批量操作</el-button>
<sc-form-table
hideDelete
id="mlogbwlist"
:tableHeight="tableHeight"
v-model="mlogbwlist"
:addTemplate="addTemplate"
placeholder="暂无数据"
>
<el-table-column prop="number" label="物料编号" fixed min-width="120px">
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ scope.row.number }}</span>
<el-input v-if="scope.row.isEdit&&mode == 'outs'" v-model="scope.row.number" placeholder="物料编号"></el-input>
<el-select
v-if="scope.row.isEdit&&mode == 'ins'"
v-model="scope.row.wpr"
placeholder="动态成品"
clearable
style="width: 100%"
@change="optionChange(scope.row)"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.number"
:value="item.id"
hideDelete
id="mlogbwlist"
:tableHeight="tableHeight"
v-model="mlogbwlist"
:addTemplate="addTemplate"
placeholder="暂无数据"
:hideAdd="hideAdd"
>
<el-table-column prop="number" label="物料编号" fixed min-width="120px">
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ scope.row.number }}</span>
<el-input v-if="scope.row.isEdit&&mode == 'outs'" v-model="scope.row.number" placeholder="物料编号"></el-input>
<el-select
v-if="scope.row.isEdit&&mode == 'ins'"
v-model="scope.row.wpr"
placeholder="动态成品"
clearable
style="width: 100%"
@change="optionChange(scope.row)"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
<template #default="scope">
<el-input-number
v-if="item.testitem_field_type=='input-number'"
v-model="scope.row[item.testitem_name]"
:min="0"
:disabled="!scope.row.isEdit"
class="width-100"
controls-position="right"
@change="defectCountSun(scope.row)"
>
</el-input-number>
<el-input-number
v-if="item.testitem_field_type=='input-int'"
v-model="scope.row[item.testitem_name]"
:min="0"
:disabled="!scope.row.isEdit"
class="width-100"
controls-position="right"
@change="defectCountSun(scope.row)"
>
</el-input-number>
<el-input
v-if="item.testitem_field_type=='input-text'"
v-model="scope.row[item.testitem_name]"
class="width-100"
:disabled="!scope.row.isEdit"
@change="defectCountSun(scope.row)"
>
</el-input>
<el-select
v-if="item.testitem_field_type=='select-text'"
v-model="scope.row[item.testitem_name]"
clearable
class="width-100"
:disabled="!scope.row.isEdit"
@change="defectCountSun(scope.row)"
>
<el-option
v-for="item0 in item.testitem_choices"
:key="item0"
:label="item0"
:value="item0"
<el-option
v-for="item in options"
:key="item.id"
:label="item.number"
:value="item.id"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
<template #default="scope">
<el-input-number
v-if="item.testitem_field_type=='input-number'"
v-model="scope.row[item.testitem_name]"
:min="0"
:disabled="!scope.row.isEdit||!item.canEdit"
class="width-100"
controls-position="right"
@change="defectCountSun(scope.row)"
>
</el-option>
</el-select>
<el-select
v-if="item.testitem_field_type=='selects-text'"
v-model="scope.row[item.testitem_name]"
clearable
multiple
class="width-100"
:disabled="!scope.row.isEdit"
@change="defectCountSun(scope.row)"
>
<el-option
v-for="item1 in item.testitem_choices"
:key="item1"
:label="item1"
:value="item1"
</el-input-number>
<el-input-number
v-if="item.testitem_field_type=='input-int'"
v-model="scope.row[item.testitem_name]"
:min="0"
:disabled="!scope.row.isEdit||!item.canEdit"
class="width-100"
controls-position="right"
@change="defectCountSun(scope.row)"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="note" :label="item.defect_name" v-for="item in qct_defects" :key="item.id" width="80px">
<template #default="scope">
<el-switch
:disabled="!scope.row.isEdit"
v-model="scope.row[item.defect_name]"
style="--el-switch-on-color: red"
@change="switchChange(scope.row, item)"
></el-switch>
</template>
</el-table-column>
<el-table-column prop="note" label="备注" width="80px">
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ scope.row.note }}</span>
<el-input v-else v-model="scope.row.note" placeholder="备注"></el-input>
</template>
</el-table-column>
<el-table-column prop="open" label="操作" width="90" align="center" fixed="right" v-if="!isSubmit">
<template #default="scope">
<el-link
v-if="scope.row.isEdit"
type="primary"
size="small"
@click="formTableSave(scope.row)"
>保存</el-link
>
<el-link
v-if="scope.row.isEdit"
type="danger"
size="small"
style="margin-left: 5px;"
@click="formTableCancel(scope.row)"
>取消</el-link
>
<el-link
v-else
type="primary"
size="small"
@click="formTableEdit(scope.row)"
>编辑</el-link
>
<el-link
v-if="!scope.row.isEdit"
type="danger"
size="small"
style="margin-left: 5px;"
@click="formTableDel(scope.row.id)"
>删除</el-link
>
</template>
</el-table-column>
</sc-form-table>
</el-input-number>
<el-input
v-if="item.testitem_field_type=='input-text'"
v-model="scope.row[item.testitem_name]"
class="width-100"
:disabled="!scope.row.isEdit||!item.canEdit"
@change="defectCountSun(scope.row)"
>
</el-input>
<el-select
v-if="item.testitem_field_type=='select-text'"
v-model="scope.row[item.testitem_name]"
clearable
class="width-100"
:disabled="!scope.row.isEdit||!item.canEdit"
@change="defectCountSun(scope.row)"
>
<el-option
v-for="item0 in item.testitem_choices"
:key="item0"
:label="item0"
:value="item0"
>
</el-option>
</el-select>
<el-select
v-if="item.testitem_field_type=='selects-text'"
v-model="scope.row[item.testitem_name]"
clearable
multiple
class="width-100"
:disabled="!scope.row.isEdit||!item.canEdit"
@change="defectCountSun(scope.row)"
>
<el-option
v-for="item1 in item.testitem_choices"
:key="item1"
:label="item1"
:value="item1"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="note" :label="item.defect_name" v-for="item in qct_defects" :key="item.id" width="120px">
<template #default="scope">
<el-switch
:disabled="!scope.row.isEdit||!item.canEdit"
v-model="scope.row[item.defect_name]"
style="--el-switch-on-color: red"
@change="switchChange(scope.row, item)"
></el-switch>
</template>
</el-table-column>
<el-table-column prop="note" label="备注" width="80px">
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ scope.row.note }}</span>
<el-input v-else v-model="scope.row.note" placeholder="备注"></el-input>
</template>
</el-table-column>
<el-table-column prop="open" label="操作" width="90" align="center" fixed="right" v-if="!isSubmit">
<template #default="scope">
<el-link
v-if="scope.row.isEdit"
type="primary"
size="small"
@click="formTableSave(scope.row)"
>保存</el-link
>
<el-link
v-if="scope.row.isEdit"
type="danger"
size="small"
style="margin-left: 5px;"
@click="formTableCancel(scope.row)"
>取消</el-link
>
<el-link
v-else
type="primary"
size="small"
@click="formTableEdit(scope.row)"
>编辑</el-link
>
<el-link
v-if="!scope.row.isEdit"
type="danger"
size="small"
style="margin-left: 5px;"
@click="formTableDel(scope.row.id)"
>删除</el-link
>
</template>
</el-table-column>
</sc-form-table>
</el-main>
</el-container>
<el-dialog
title="检验"
v-model="checkVisible"
destroy-on-close
>
<el-container>
<el-main>
<el-form
ref="dialogForm"
:model="form"
:rules="rules"
label-width="80px"
>
<el-row>
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="操作人" prop="test_user">
<ehsSelect
v-model="form.test_user"
:showName="test_user_name"
:apiObj="this.$API.system.user.list"
:params="{ depts: dept }"
style="width: 100%"
@change="userChange"
></ehsSelect>
</el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="设备" prop="equipment">
<el-select
v-model="form.equipment"
placeholder="设备"
clearable
filterable
style="width: 100%"
@change="equipmentChange"
>
<el-option
v-for="item in equipmentOptions"
:key="item.id"
:label="item.name"
:value="item.id"
>
<span style="float:left">{{item.name}}</span>
<span style="float:right">{{item.number}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="检测项">
<el-select
v-model="form.testitemids"
placeholder="检测项"
clearable
filterable
multiple
style="width: 100%"
@change="testitemidsChange"
>
<el-option
v-for="item in qct_testitems"
:key="item.testitem"
:label="item.testitem_name"
:value="item.testitem"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="缺陷项">
<el-select
v-model="form.defectids"
placeholder="缺陷项"
clearable
filterable
multiple
style="width: 100%"
@change="defectidsChange"
>
<el-option
v-for="item in qct_defects"
:key="item.defect"
:label="item.defect_name"
:value="item.defect"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-footer>
<el-button type="primary" :loading="isSaveing" @click.stop="checkSetting" save>确定</el-button>
<el-button @click="saveCancel">取消</el-button>
</el-footer>
</el-main>
</el-container>
</el-dialog>
<el-dialog
title="检验"
v-model="setVisible"
destroy-on-close
>
<el-container>
<el-main>
<el-form
ref="dialogForm"
:model="form"
:rules="rules"
label-width="150px"
>
<el-row>
<el-col v-for="item in testitemlists" :key="item.id">
<el-form-item :label="item.testitem_name">
<el-input v-model="item.value"></el-input>
</el-form-item>
</el-col>
<el-col v-for="item2 in defectlists" :key="item2.id">
<el-form-item :label="item2.defect_name">
<el-input v-model="item2.value"></el-input>
</el-form-item>
</el-col>
<el-col>
<!-- 扫描物料的number 根据number对比list里的物料-->
<el-form-item label="检测物料">
<el-input v-model="wprNumber" @change="wprChange(wprNumber)"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row>
<el-table :data="selectWpr" border>
<el-table-column prop="number" label="物料编号"></el-table-column>
<el-table-column v-for="item in testitemlists" :key="item.id" :label="item.testitem_name">
{{ item.value }}
</el-table-column>
<el-table-column v-for="item2 in defectlists" :key="item2.id" :label="item2.defect_name">
{{ item2.value }}
</el-table-column>
<el-table-column label="操作" width="90" align="center" fixed="right">
<template #default="scope">
<el-link type="danger" size="small" @click="selectWprDel(scope.row)">删除</el-link>
</template>
</el-table-column>
</el-table>
</el-row>
<el-footer>
<el-button type="primary" :loading="isSaveing" @click.stop="saveSetting" save>保存</el-button>
<el-button @click="saveCancel">取消</el-button>
</el-footer>
</el-main>
</el-container>
</el-dialog>
<!-- <check-drawer
v-if="drawerVisible"
ref="saveDialog"
:defects="qct_defects"
:testitems="qct_testitems"
:mlogbwlist="mlogbwlist"
@success="handleSaveSuccess"
@closed="saveMlogbInClose"
>
</check-drawer> -->
</el-drawer>
</template>
<script>
import checkDrawer from "./mlogbw_check_form.vue";
export default {
props: {
mlogb: {
@ -183,11 +365,18 @@ export default {
type: String,
default: "",
},
mgroup:{
type: String,
default: "",
},
isSubmit:{
type: Boolean,
default: false,
},
},
components: {
checkDrawer
},
emits: ["success", "closed"],
data() {
return {
@ -198,21 +387,49 @@ export default {
},
mode:'ins',
//
form: {},
form: {
test_user:"",
equipment:"",
equipment_name:"",
testitemids : [],
defectids : [],
},
test_user_name:"",
qct:"",
mgroup: "",
values:"",
wprNumber:"",
params: {mlogb:'',page:0},
hideAdd: true,
visible: false,
setVisible:false,
checkVisible:false,
descriptionVisible:false,
options:[],
qct_defects:[],
qct_testitems:[],
mlogbwlist:[],
equipmentOptions:[],
addTemplate:{
mlogb: "",
number: "",
note: "",
isEdit: true,
},
setForm:{
test_user:"",
equipment:"",
equipment_name:"",
testitemids : [],
defectids : [],
},
rules: {
test_user: [{ required: true, message: "请选择操作人" }],
equipment:[{ required: true, message: "请选择设备" }],
},
defectlists:[],
testitemlists:[],
selectWpr:[],
tableHeight:500,
apiObjPrint:this.$API.cm.labelmat.fromWm,
printer_name:localStorage.getItem("printer_name")
@ -220,6 +437,7 @@ export default {
},
mounted() {
let that = this;
that.hideAdd = that.isSubmit;
that.addTemplate.number = that.batchNumber;
that.params.mlogb = that.addTemplate.mlogb = that.mlogb;
},
@ -231,11 +449,17 @@ export default {
that.getOptions();
that.getdefects();
this.visible = true;
setTimeout(() => {
this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;
},500)
// setTimeout(() => {
// this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;
// },500)
},
getEquipments(){
let that = this;
that.$API.em.equipment.list.req({page:0}).then((res) => {
that.equipmentOptions = res;
})
},
getdefects(){
let that = this;
if(that.qct!==null&&that.qct!==''){
@ -281,7 +505,6 @@ export default {
console.log('item',item);
let index = that.mlogbwlist.indexOf(row);
that.mlogbwlist[index].number = item.number;
// that.mlogbwlist[index].wpr = item.id;
}
})
},
@ -294,6 +517,7 @@ export default {
let obj = {};
obj = Object.assign({},item);
obj.isEdit = false;
obj.canEdit = false;
if(that.qct!=null&&that.qct!=''&&item.ftest!=null){
if(item.ftest.ftestdefects!==undefined&&item.ftest.ftestdefects!==''&&item.ftest.ftestdefects!==null&&item.ftest.ftestdefects.length>0){
item.ftest.ftestdefects.forEach((item1) => {
@ -319,7 +543,6 @@ export default {
}
that.mlogbwlist.push(obj);
})
console.log('mlogbwlistmlogbwlist',that.mlogbwlist);
}
})
},
@ -398,6 +621,7 @@ export default {
formTableEdit(row) {
this.mlogbwlist.forEach((item, index) => {
if (item.id == row.id) {
console.log('row',row);
this.mlogbwlist[index].isEdit = true;
}
});
@ -485,6 +709,171 @@ export default {
});
})
},
userChange(val){
let that = this;
this.$API.system.user.item.req(val).then((res) => {
that.setForm.test_user_name = res.name;
})
},
equipmentChange(){
let that = this;
that.equipmentOptions.forEach(item => {
if(item.id == that.form.equipment){
that.form.equipment_name = item.name;
}
});
},
testitemidsChange(){
let that = this;
that.testitemlists = [];
that.qct_testitems.forEach(item => {
if(that.form.testitemids.indexOf(item.testitem) > -1){
item.canEdit = true;
item.value=null;
that.testitemlists.push(item);
}
});
},
defectidsChange(){
let that = this;
that.defectlists = [];
that.qct_defects.forEach(item => {
if(that.form.defectids.indexOf(item.defect) > -1){
item.canEdit = true;
item.value=null;
that.defectlists.push(item);
}
})
},
check_start(){
this.checkVisible=true;
this.getEquipments();
},
checkSetting(){
let that = this;
this.$refs.dialogForm.validate((valid) => {
if (valid) {
Object.assign(that.setForm,that.form);
this.form = {};
that.mlogbwlist.forEach(item => {
if(item.ftest!==null){
item.ftest.ftestdefects.forEach(defect => {
if(that.setForm.defectids.indexOf(defect.defect) > -1){
defect.test_user = that.setForm.test_user;
// defect.test_equip = that.setForm.equipment;
}
})
item.ftest.ftestitems.forEach(testitem => {
if(that.setForm.testitemids.indexOf(testitem.testitem) > -1){
testitem.test_user = that.setForm.test_user;
testitem.test_equip = that.setForm.equipment;
}
})
}else{
let ftest = {};
ftest.ftestitems = [];
ftest.ftestdefects = [];
ftest.qct = that.qct;
ftest.test_date = that.handle_date;
ftest.test_user = that.handle_user;
that.qct_defects.forEach((item0) => {
let itemObj = {};
itemObj.defect = item0.defect;
itemObj.has = false;
if(that.setForm.defectids.indexOf(item0.defect) > -1){
itemObj.test_user = that.setForm.test_user;
// itemObj.test_equip = that.setForm.equipment;
}else{
itemObj.test_user = that.handle_user;
}
ftest.ftestdefects.push(itemObj);
})
that.qct_testitems.forEach((item1) => {
let itemObj1 = {};
itemObj1.testitem = item1.testitem;
itemObj1.addto_wpr = item1.addto_wpr;
itemObj1.test_val_json = "";
if(that.setForm.testitemids.indexOf(item1.testitem) > -1){
itemObj1.test_user = that.setForm.test_user;
itemObj1.test_equip = that.setForm.equipment;
}else{
itemObj1.test_user = that.handle_user;
}
ftest.ftestitems.push(itemObj1);
})
item.ftest = ftest;
}
});
that.$API.wpm.mlogbw.update.req("bulk",that.mlogbwlist).then((res) => {
console.log('blukres',res);
that.checkVisible = false;
that.descriptionVisible = true;
that.getList();
}).catch((err) => {
return err;
});
}
});
},
saveCancel(){
this.form = {};
this.form.test_user = "";
this.form.equipment = "";
this.form.testitemids = [];
this.form.defectids = [];
this.checkVisible = false;
},
check_set(){
this.setVisible=true;
},
wprChange(wprNumber){
let that = this;
that.mlogbwlist.forEach(item => {
if(item.number == wprNumber){
that.selectWpr.push(item);
}
});
},
selectWprDel(row){
let that = this;
that.selectWpr.forEach((item,index) => {
if(item.number == row.number){
that.selectWpr.splice(index,1);
}
});
},
saveSetting(){
let that = this;
this.$refs.dialogForm.validate((valid) => {
if (valid) {
that.selectWpr.forEach(item => {
item.ftest.ftestdefects.forEach(defect => {
let defectindex = that.setForm.defectids.indexOf(defect.defect);
if(defectindex > -1){
defect.has = that.defectlists[defectindex].value;
}
})
item.ftest.ftestitems.forEach(testitem => {
let testitemindex = that.setForm.testitemids.indexOf(testitem.testitem);
if( testitemindex > -1){
console.log('that.testitemlists[testitemindex].value',that.testitemlists[testitemindex].value)
testitem.test_val_json = that.testitemlists[testitemindex].value;
}
})
});
console.log('that.selectWpr',that.selectWpr);
that.$API.wpm.mlogbw.update.req("bulk",that.selectWpr).then((res) => {
console.log('blukres',res);
that.setVisible = false;
that.descriptionVisible = false;
that.setForm = {};
that.getList();
}).catch((err) => {
return err;
});
}
});
},
},
};
</script>

View File

@ -0,0 +1,193 @@
<template>
<el-dialog
title="检验"
v-model="visible"
destroy-on-close
@closed="$emit('closed')"
>
<el-container>
<el-main id="mlogbwMain">
<el-form
ref="dialogForm"
:model="form"
:rules="rules"
label-width="80px"
>
<el-row>
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="操作人">
<ehsSelect
v-model="form.handle_user"
:showName="form.handle_user_name"
:apiObj="this.$API.system.user.list"
:params="{ depts: dept }"
style="width: 100%"
></ehsSelect>
</el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="设备">
<el-select
v-model="form.equipment"
placeholder="设备"
clearable
filterable
style="width: 100%"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.label"
:value="item.id"
>
<span style="float:left">{{item.name}}</span>
<span style="float:right">{{item.number}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="检测项">
<el-select
v-model="form.testitemlist"
placeholder="检测项"
clearable
filterable
multiple
style="width: 100%"
>
<el-option
v-for="item in testitems"
:key="item.testitem"
:label="item.testitem_name"
:value="item.testitem"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="缺陷项">
<el-select
v-model="form.defectlist"
placeholder="缺陷项"
clearable
filterable
multiple
style="width: 100%"
>
<el-option
v-for="item in defects"
:key="item.defect"
:label="item.defect_name"
:value="item.defect"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button type="primary" :loading="isSaveing" @click="submit">
保存
</el-button>
<el-button @click="visible = false">取消</el-button>
</template>
</el-main>
</el-container>
</el-dialog>
</template>
<script>
export default {
props: {
defects: {
type: Object,
default: () => {}
},
mlogbwlist: {
type: Object,
default: () => {}
},
testitems:{
type: Object,
default: () => {}
}
},
emits: ["success", "closed"],
data() {
return {
loading: false,
//
form: {},
qct:"",
mgroup: "",
params: {mlogb:'',page:0},
hideAdd: true,
visible: false,
options:[],
qct_defects:[],
qct_testitems:[],
mlogbwlists:[],
tableHeight:500,
apiObjPrint:this.$API.cm.labelmat.fromWm,
printer_name:localStorage.getItem("printer_name")
};
},
mounted() {
},
methods: {
open(qct = '') {
let that = this;
that.qct = qct;
that.getDefects();//
// that.getUsers();//
// that.getEquipment();//
that.visible = true;
console.log('this.defects',this.defects)
console.log('this.testitems',this.testitems)
console.log('this.mlogbwlist',this.mlogbwlist)
// setTimeout(() => {
// that.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;
// },500)
},
getDefects(){
let that = this;
if(that.qct!==null&&that.qct!==''){
that.$API.qm.qct.item.req(that.qct).then((res) => {
that.qct_defects = [];
that.qct_defects = res.qct_defects;
})
}
},
getEquipment() {
let that = this;
this.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup}).then((res) => {
res.forEach((item) => {
let obj = {};
Object.assign(obj, item);
obj.label = item.name+'-'+item.number;
that.options.push(obj);
});
});
},
//
mlogbSubmit() {
let that = this;
that.$API.wpm.mlogb.submit.req(that.mlogb).then((res) => {
that.isSaveing = false;
that.visible = false;
that.$message.success("操作成功");
});
},
},
};
</script>
<style scoped>
.width-100{
width: 100%;
}
</style>