Commit 62707722 authored by 张海景's avatar 张海景

update:修改工装夹具领用单新增禁用避免重复选择

parent b384308d
......@@ -92,12 +92,11 @@
</el-table-column>
</el-table>
<el-dialog :visible.sync="showFlag" width="700px" title="添加BOM">
<el-dialog :visible.sync="showFlag" width="900px" title="添加BOM">
<el-form
ref="form"
:model="form"
:rules="rules"
inline
label-width="100px"
size="small"
>
......@@ -166,6 +165,7 @@
<el-form-item label="虚拟项目标识" prop="virtualProjectLog">
<el-select
v-model="form.virtualProjectLog"
style="width:100%;"
placeholder="请选择虚拟项目标识"
>
<el-option
......@@ -189,6 +189,7 @@
<el-form-item label="是否倒冲" prop="isBackflush">
<el-select
v-model="form.isBackflush"
style="width:100%;"
placeholder="请选择是否倒冲"
>
<el-option
......
......@@ -6,7 +6,7 @@
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
label-width="100px"
>
<!-- <el-form-item label="工单编码" prop="workorderCode">
<el-input
......
......@@ -322,7 +322,7 @@
</el-table-column>
<el-table-column label="剩余寿命" prop="lifeTime" />
</el-table>
<SelectSn ref="selectSnRef" :id="currentInfo.itemId" @onSelected="onSelectSn" />
<SelectSn ref="selectSnRef" :data="tmToolRequestList" :id="currentInfo.itemId" @onSelected="onSelectSn" />
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
......
......@@ -34,7 +34,7 @@
<el-table-column width="55" align="center">
<template v-slot="scope">
<!-- 可以手动的修改label的值,从而控制选择哪一项 -->
<el-radio class="radio" v-model="selectedItemId" :label="scope.row.toolId"
<el-radio class="radio" :disabled="scope.row.disabled" v-model="selectedItemId" :label="scope.row.toolId"
>{{ "" }}</el-radio
>
</template>
......@@ -84,6 +84,9 @@ export default {
props: {
id: {
type: [Number||String]
},
data: {
type: Array
}
},
data() {
......@@ -121,8 +124,8 @@ export default {
// 根据名称筛选分类树
showFlag: {
handler (newName, oldName) {
console.log(newName, 'newName')
if (newName) {
this.selectedItemId = ''
this.getList();
}
},
......@@ -140,8 +143,17 @@ export default {
getList() {
this.loading = true;
this.queryParams.itemId = this.id
const ids = this.data.flatMap(it => it.isCheck)
getTmToolSnList(this.queryParams).then((response) => {
this.itemList = response.rows;
this.itemList = []
response.rows.forEach(item => {
ids.forEach(el => {
if (item.toolId === el) {
this.$set(item, 'disabled', true)
}
});
this.itemList.push(item)
})
this.total = response.total;
this.loading = false;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment