bom设备回显bug

yangwl
A0010407 1 year ago
parent 5ae84ff69a
commit 4091c0e839

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

@ -33,10 +33,10 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="BOM物料名称" prop="itemName"> <el-form-item label="产品名称" prop="itemName">
<el-input <el-input
v-model="queryParams.itemName" v-model="queryParams.itemName"
placeholder="请输入BOM物料名称" placeholder="请输入产品名称"
clearable clearable
style="width: 240px" style="width: 240px"
@keyup.enter.native="handleQuery" @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 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 label="BOM物料编码" align="center" key="itemCode" prop="bomCode" v-if="columns[0].visible" >
</el-table-column> </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> </el-table>
<pagination <pagination
@ -75,35 +77,14 @@
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import {listBom} from "@/api/technology/process"; import {listBom} from "@/api/technology/process";
export default { export default {
name: "ItemSingleBom", name: "ItemSingleBom",
// components: { Treeselect }, // components: { Treeselect },
data() { data() {
return { 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, showFlag:false,
// //
selectedItemId: undefined, selectedItemId: undefined,
@ -116,7 +97,7 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// // BOM
itemList: null, itemList: null,
// //
itemTypeOptions: undefined, itemTypeOptions: undefined,
@ -134,11 +115,14 @@ export default {
bomCode: undefined, bomCode: undefined,
itemTypeId: 0, itemTypeId: 0,
itemCodeGet: '', itemCodeGet: '',
productDescZh : undefined,
}, },
// //
columns: [ columns: [
{ key: 0, label: `BOM物料编码`, visible: true }, { 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() { getList() {
this.loading = true; this.loading = true;
this.queryParams.bomCode = this.queryParams.itemCode;
this.queryParams.productDescZh = this.queryParams.itemName;
listBom(this.queryParams).then(response => { listBom(this.queryParams).then(response => {
this.itemList = response.rows; this.itemList = response.rows;
this.total = response.total; this.total = response.total;
@ -261,6 +247,7 @@ export default {
// this.showFlag = false; // this.showFlag = false;
// } // }
// //
submitBomForm() { submitBomForm() {
const data = this.ids; const data = this.ids;
console.log("数据",data); console.log("数据",data);

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

@ -33,10 +33,10 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="BOM物料名称" prop="itemName"> <el-form-item label="产品名称" prop="itemName">
<el-input <el-input
v-model="queryParams.itemName" v-model="queryParams.itemName"
placeholder="请输入BOM物料名称" placeholder="请输入产品名称"
clearable clearable
style="width: 240px" style="width: 240px"
@keyup.enter.native="handleQuery" @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 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 label="BOM物料编码" align="center" key="itemCode" prop="bomCode" v-if="columns[0].visible" >
</el-table-column> </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> </el-table>
<pagination <pagination
@ -75,35 +77,14 @@
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import {listBom} from "@/api/technology/process"; import {listBom} from "@/api/technology/process";
export default { export default {
name: "ItemSingleBom", name: "ItemSingleBom",
// components: { Treeselect }, // components: { Treeselect },
data() { data() {
return { 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, showFlag:false,
// //
selectedItemId: undefined, selectedItemId: undefined,
@ -116,7 +97,7 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// // BOM
itemList: null, itemList: null,
// //
itemTypeOptions: undefined, itemTypeOptions: undefined,
@ -134,11 +115,14 @@ export default {
bomCode: undefined, bomCode: undefined,
itemTypeId: 0, itemTypeId: 0,
itemCodeGet: '', itemCodeGet: '',
productDescZh : undefined,
}, },
// //
columns: [ columns: [
{ key: 0, label: `BOM物料编码`, visible: true }, { 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() { getList() {
this.loading = true; this.loading = true;
this.queryParams.bomCode = this.queryParams.itemCode;
this.queryParams.productDescZh = this.queryParams.itemName;
listBom(this.queryParams).then(response => { listBom(this.queryParams).then(response => {
this.itemList = response.rows; this.itemList = response.rows;
this.total = response.total; this.total = response.total;
@ -261,6 +247,7 @@ export default {
// this.showFlag = false; // this.showFlag = false;
// } // }
// //
submitBomForm() { submitBomForm() {
const data = this.ids; const data = this.ids;
console.log("数据",data); console.log("数据",data);

Loading…
Cancel
Save