bom设备回显bug

yangwl
A0010407 1 year ago
parent 5ae84ff69a
commit 4091c0e839

@ -202,7 +202,7 @@ export default {
methods: {
//
onItemSelectedEquipment(obj){
if(this.form.device == null){
if(this.form.device == null || this.form.device == ""){
console.log("device是空if获取的obj",obj);
console.log("device是空if获取的device",this.form.device);
this.form.device = obj;
@ -227,7 +227,7 @@ export default {
//
onItemSelectedBom(obj){
if(this.form.material == null){
if(this.form.material == null ||this.form.material == ""){
console.log("material是空if获取的obj",obj);
console.log("material是空if获取的material",this.form.material);
this.form.material = obj;

@ -33,10 +33,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="BOM物料名称" prop="itemName">
<el-form-item label="产品名称" prop="itemName">
<el-input
v-model="queryParams.itemName"
placeholder="请输入BOM物料名称"
placeholder="请输入产品名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
@ -57,7 +57,9 @@
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
<el-table-column label="BOM物料编码" align="center" key="itemCode" prop="bomCode" v-if="columns[0].visible" >
</el-table-column>
<el-table-column label="BOM物料名称" align="left" key="itemName" prop="bomName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="产品名称" align="left" key="itemName" prop="productDescZh" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="BOM物料组件编码" align="left" key="component" prop="component" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="BOM物料组件名称" align="left" key="componentName" prop="componentName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
</el-table>
<pagination
@ -75,35 +77,14 @@
</div>
</el-dialog>
</template>
<script>
import {listBom} from "@/api/technology/process";
export default {
name: "ItemSingleBom",
// components: { Treeselect },
data() {
return {
// treeData: [{
// id: '1',
// label: 'BOM',
// children: [{
// id: 'equ_type_lg',
// label: ''
// }, {
// id: 'equ_type_cxj',
// label: ''
// }, {
// id: 'equ_type_hf',
// label: ''
// }, {
// id: 'equ_type_spj',
// label: ''
// }, {
// id: 'equ_type_bzx',
// label: '线'
// }
// ]
// }],
showFlag:false,
//
selectedItemId: undefined,
@ -116,7 +97,7 @@ export default {
showSearch: true,
//
total: 0,
//
// BOM
itemList: null,
//
itemTypeOptions: undefined,
@ -134,11 +115,14 @@ export default {
bomCode: undefined,
itemTypeId: 0,
itemCodeGet: '',
productDescZh : undefined,
},
//
columns: [
{ key: 0, label: `BOM物料编码`, visible: true },
{ key: 1, label: `BOM物料名称`, visible: true }
{ key: 1, label: `产品名称`, visible: true },
{ key: 2, label: `BOM物料组件编码`, visible: true },
{ key: 3, label: `BOM物料组件名称`, visible: true }
]
};
},
@ -158,9 +142,11 @@ export default {
},
//
/** 查询设备编码列表*/
/** 查询BOM列表*/
getList() {
this.loading = true;
this.queryParams.bomCode = this.queryParams.itemCode;
this.queryParams.productDescZh = this.queryParams.itemName;
listBom(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
@ -261,6 +247,7 @@ export default {
// this.showFlag = false;
// }
//
submitBomForm() {
const data = this.ids;
console.log("数据",data);

@ -313,7 +313,7 @@ export default {
},
//
onItemSelectedEquipment(obj){
if(this.form.device == null){
if(this.form.device == null || this.form.device == ""){
console.log("device是空if获取的obj",obj);
console.log("device是空if获取的device",this.form.device);
this.form.device = obj;
@ -338,7 +338,7 @@ export default {
//
onItemSelectedBom(obj){
if(this.form.material == null){
if(this.form.material == null || this.form.material == ""){
console.log("material是空if获取的obj",obj);
console.log("material是空if获取的material",this.form.material);
this.form.material = obj;

@ -33,10 +33,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="BOM物料名称" prop="itemName">
<el-form-item label="产品名称" prop="itemName">
<el-input
v-model="queryParams.itemName"
placeholder="请输入BOM物料名称"
placeholder="请输入产品名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
@ -57,7 +57,9 @@
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
<el-table-column label="BOM物料编码" align="center" key="itemCode" prop="bomCode" v-if="columns[0].visible" >
</el-table-column>
<el-table-column label="BOM物料名称" align="left" key="itemName" prop="bomName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="产品名称" align="left" key="itemName" prop="productDescZh" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="BOM物料组件编码" align="left" key="component" prop="component" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="BOM物料组件名称" align="left" key="componentName" prop="componentName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
</el-table>
<pagination
@ -75,35 +77,14 @@
</div>
</el-dialog>
</template>
<script>
import {listBom} from "@/api/technology/process";
export default {
name: "ItemSingleBom",
// components: { Treeselect },
data() {
return {
// treeData: [{
// id: '1',
// label: 'BOM',
// children: [{
// id: 'equ_type_lg',
// label: ''
// }, {
// id: 'equ_type_cxj',
// label: ''
// }, {
// id: 'equ_type_hf',
// label: ''
// }, {
// id: 'equ_type_spj',
// label: ''
// }, {
// id: 'equ_type_bzx',
// label: '线'
// }
// ]
// }],
showFlag:false,
//
selectedItemId: undefined,
@ -116,7 +97,7 @@ export default {
showSearch: true,
//
total: 0,
//
// BOM
itemList: null,
//
itemTypeOptions: undefined,
@ -134,11 +115,14 @@ export default {
bomCode: undefined,
itemTypeId: 0,
itemCodeGet: '',
productDescZh : undefined,
},
//
columns: [
{ key: 0, label: `BOM物料编码`, visible: true },
{ key: 1, label: `BOM物料名称`, visible: true }
{ key: 1, label: `产品名称`, visible: true },
{ key: 2, label: `BOM物料组件编码`, visible: true },
{ key: 3, label: `BOM物料组件名称`, visible: true }
]
};
},
@ -158,9 +142,11 @@ export default {
},
//
/** 查询设备编码列表*/
/** 查询BOM列表*/
getList() {
this.loading = true;
this.queryParams.bomCode = this.queryParams.itemCode;
this.queryParams.productDescZh = this.queryParams.itemName;
listBom(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
@ -261,6 +247,7 @@ export default {
// this.showFlag = false;
// }
//
submitBomForm() {
const data = this.ids;
console.log("数据",data);

Loading…
Cancel
Save