|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
|
<el-form-item label="物料编码" prop="materialCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.materialCode"
|
|
|
|
@ -17,6 +17,14 @@
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="父级物料编码" prop="parentId">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.parentId"
|
|
|
|
|
placeholder="请输入物料名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
@ -34,11 +42,12 @@
|
|
|
|
|
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[3].visible"/>
|
|
|
|
|
<el-table-column label="物料类别" align="center" prop="materialType" v-if="columns[4].visible">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.material_type" :value="scope.row.materialType"/>
|
|
|
|
|
<dict-tag :options="dict.type.material_subclass" :value="scope.row.materialType"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="标准数量" align="center" prop="standardAmount" v-if="columns[5].visible"/>
|
|
|
|
|
<el-table-column label="父级编号" align="center" prop="parentId" v-if="columns[6].visible"/>
|
|
|
|
|
<el-table-column label="父级物料编号" align="center" prop="parentId" v-if="columns[6].visible"/>
|
|
|
|
|
<el-table-column label="父级物料名称" align="center" prop="parentName" v-if="columns[16].visible"/>
|
|
|
|
|
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[7].visible">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
|
|
|
|
@ -99,11 +108,16 @@ import {
|
|
|
|
|
addOrderBomInfo,
|
|
|
|
|
updateOrderBomInfo
|
|
|
|
|
} from '@/api/base/orderBomInfo'
|
|
|
|
|
import { listMaterialInfo } from '@//api/base/materialInfo'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'OrderBomInfo',
|
|
|
|
|
dicts: ['material_type', 'is_flag'],
|
|
|
|
|
dicts: ['material_subclass', 'is_flag'],
|
|
|
|
|
props: {
|
|
|
|
|
message: String
|
|
|
|
|
},
|
|
|
|
|
// mounted() {
|
|
|
|
|
// this.getList();
|
|
|
|
|
// },
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 遮罩层
|
|
|
|
@ -152,7 +166,7 @@ export default {
|
|
|
|
|
rules: {},
|
|
|
|
|
columns: [
|
|
|
|
|
{ key: 0, label: `主键标识`, visible: false },
|
|
|
|
|
{ key: 1, label: `BOM编号`, visible: true },
|
|
|
|
|
{ key: 1, label: `BOM编号`, visible: false },
|
|
|
|
|
{ key: 2, label: `物料编码`, visible: true },
|
|
|
|
|
{ key: 3, label: `物料名称`, visible: true },
|
|
|
|
|
{ key: 4, label: `物料类别`, visible: true },
|
|
|
|
@ -166,7 +180,8 @@ export default {
|
|
|
|
|
{ key: 12, label: `工厂编号`, visible: false },
|
|
|
|
|
{ key: 13, label: `排序`, visible: false },
|
|
|
|
|
{ key: 14, label: `销售凭证`, visible: false },
|
|
|
|
|
{ key: 15, label: `销售单据项目`, visible: false }
|
|
|
|
|
{ key: 15, label: `销售单据项目`, visible: false },
|
|
|
|
|
{ key: 16, label: `父级物料名称`, visible: true }
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -177,7 +192,11 @@ export default {
|
|
|
|
|
/** 查询订单BOM列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
listMaterialInfo(this.queryParams).then(response => {
|
|
|
|
|
if (this.message != null){
|
|
|
|
|
this.queryParams.parentId = this.message;
|
|
|
|
|
console.log(333,this.queryParams.parentId)
|
|
|
|
|
}
|
|
|
|
|
listOrderBomInfo(this.queryParams).then(response => {
|
|
|
|
|
this.orderBomInfoList = response.rows
|
|
|
|
|
this.total = response.total
|
|
|
|
|
this.loading = false
|
|
|
|
|