|
|
@ -1,10 +1,10 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="app-container">
|
|
|
|
<div class="app-container">
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
<el-form-item label="子物料编号" prop="materialCode">
|
|
|
|
<el-form-item label="物料编号" prop="materialCode">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
v-model="queryParams.materialCode"
|
|
|
|
v-model="queryParams.materialCode"
|
|
|
|
placeholder="请输入子物料编号"
|
|
|
|
placeholder="请输入物料编号"
|
|
|
|
clearable
|
|
|
|
clearable
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
@ -91,7 +91,7 @@
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
|
|
|
|
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
|
|
|
|
<el-table-column label="BOM编号" align="center" prop="bomCode" v-if="columns[1].visible"/>
|
|
|
|
<el-table-column label="BOM编号" align="center" prop="bomCode" v-if="columns[1].visible"/>
|
|
|
|
<el-table-column label="子物料编号" align="center" prop="materialCode" v-if="columns[2].visible"/>
|
|
|
|
<el-table-column label="物料编号" align="center" prop="materialCode" v-if="columns[2].visible"/>
|
|
|
|
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[3].visible"/>
|
|
|
|
<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">
|
|
|
|
<el-table-column label="物料类型" align="center" prop="materialType" v-if="columns[4].visible">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
@ -101,7 +101,7 @@
|
|
|
|
<el-table-column label="标准数量" align="center" prop="standardAmount" v-if="columns[5].visible"/>
|
|
|
|
<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="plantCode" v-if="columns[7].visible"/>
|
|
|
|
<el-table-column label="工厂编号" align="center" prop="plantCode" v-if="columns[7].visible"/>
|
|
|
|
<el-table-column label="产线/工位" align="center" prop="productLineCode" v-if="columns[8].visible"/>
|
|
|
|
<!-- <el-table-column label="产线/工位" align="center" prop="productLineCode" v-if="columns[8].visible"/>-->
|
|
|
|
<el-table-column label="工单编号" align="center" prop="orderCode" v-if="columns[14].visible"/>
|
|
|
|
<el-table-column label="工单编号" align="center" prop="orderCode" v-if="columns[14].visible"/>
|
|
|
|
<el-table-column label="是否标识" align="center" prop="isFlag" v-if="columns[9].visible">
|
|
|
|
<el-table-column label="是否标识" align="center" prop="isFlag" v-if="columns[9].visible">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
@ -152,13 +152,25 @@
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
<el-form-item label="BOM编号" prop="bomCode">
|
|
|
|
<el-form-item label="BOM编号" prop="bomCode">
|
|
|
|
<el-input v-model="form.bomCode" placeholder="请输入BOM编号" />
|
|
|
|
<el-input v-model="form.bomCode" placeholder="请输入BOM编号" :disabled="true"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="子物料编号" prop="materialCode">
|
|
|
|
<el-form-item label="所属工厂">
|
|
|
|
<el-input v-model="form.materialCode" placeholder="请输入子物料编号" />
|
|
|
|
<el-select v-model="form.plantCode" placeholder="请选择所属工厂">
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in factoryList"
|
|
|
|
|
|
|
|
:key="item.factoryCode"
|
|
|
|
|
|
|
|
:label="item.factoryName"
|
|
|
|
|
|
|
|
:value="item.factoryCode"
|
|
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-input v-model="form.materialName" placeholder="请输入物料名称" />
|
|
|
|
<el-input v-model="form.materialName" placeholder="请输入物料名称" >
|
|
|
|
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="handleMaterialAdd"></el-button>
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="物料编号" prop="materialCode">
|
|
|
|
|
|
|
|
<el-input v-model="form.materialCode" placeholder="请输入物料编号" disabled/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="物料类型" prop="materialType">
|
|
|
|
<el-form-item label="物料类型" prop="materialType">
|
|
|
|
<el-select v-model="form.materialType" placeholder="请选择物料类型">
|
|
|
|
<el-select v-model="form.materialType" placeholder="请选择物料类型">
|
|
|
@ -170,63 +182,70 @@
|
|
|
|
></el-option>
|
|
|
|
></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="标准数量" prop="standardAmount">
|
|
|
|
<!-- <el-form-item label="标准数量" prop="standardAmount">-->
|
|
|
|
<el-input v-model="form.standardAmount" placeholder="请输入标准数量" />
|
|
|
|
<!-- <el-input v-model="form.standardAmount" placeholder="请输入标准数量" />-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="父物料编号" prop="parentId">
|
|
|
|
<!-- <el-form-item label="父物料编号" prop="parentId">-->
|
|
|
|
<el-input v-model="form.parentId" placeholder="请输入父物料编号" />
|
|
|
|
<!-- <el-input v-model="form.parentId" placeholder="请输入父物料编号" />-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="工厂编号" prop="plantCode">
|
|
|
|
<!-- <el-form-item label="产线/工位" prop="productLineCode">-->
|
|
|
|
<el-input v-model="form.plantCode" placeholder="请输入工厂编号" />
|
|
|
|
<!-- <el-input v-model="form.productLineCode" placeholder="请输入产线/工位" />-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="产线/工位" prop="productLineCode">
|
|
|
|
<!-- <el-form-item label="是否标识" prop="isFlag">-->
|
|
|
|
<el-input v-model="form.productLineCode" placeholder="请输入产线/工位" />
|
|
|
|
<!-- <el-radio-group v-model="form.isFlag">-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- <el-radio-->
|
|
|
|
<el-form-item label="是否标识" prop="isFlag">
|
|
|
|
<!-- v-for="dict in dict.type.is_flag"-->
|
|
|
|
<el-radio-group v-model="form.isFlag">
|
|
|
|
<!-- :key="dict.value"-->
|
|
|
|
<el-radio
|
|
|
|
<!-- :label="parseInt(dict.value)"-->
|
|
|
|
v-for="dict in dict.type.is_flag"
|
|
|
|
<!-- >{{dict.label}}</el-radio>-->
|
|
|
|
:key="dict.value"
|
|
|
|
<!-- </el-radio-group>-->
|
|
|
|
:label="parseInt(dict.value)"
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
>{{dict.label}}</el-radio>
|
|
|
|
<!-- <el-form-item label="创建人" prop="createdBy">-->
|
|
|
|
</el-radio-group>
|
|
|
|
<!-- <el-input v-model="form.createdBy" placeholder="请输入创建人" />-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="创建人" prop="createdBy">
|
|
|
|
<!-- <el-form-item label="创建时间" prop="createdTime">-->
|
|
|
|
<el-input v-model="form.createdBy" placeholder="请输入创建人" />
|
|
|
|
<!-- <el-date-picker clearable-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- v-model="form.createdTime"-->
|
|
|
|
<el-form-item label="创建时间" prop="createdTime">
|
|
|
|
<!-- type="date"-->
|
|
|
|
<el-date-picker clearable
|
|
|
|
<!-- value-format="yyyy-MM-dd"-->
|
|
|
|
v-model="form.createdTime"
|
|
|
|
<!-- placeholder="请选择创建时间">-->
|
|
|
|
type="date"
|
|
|
|
<!-- </el-date-picker>-->
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
placeholder="请选择创建时间">
|
|
|
|
<!-- <el-form-item label="更新人" prop="updatedBy">-->
|
|
|
|
</el-date-picker>
|
|
|
|
<!-- <el-input v-model="form.updatedBy" placeholder="请输入更新人" />-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="更新人" prop="updatedBy">
|
|
|
|
<!-- <el-form-item label="更新时间" prop="updatedTime">-->
|
|
|
|
<el-input v-model="form.updatedBy" placeholder="请输入更新人" />
|
|
|
|
<!-- <el-date-picker clearable-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- v-model="form.updatedTime"-->
|
|
|
|
<el-form-item label="更新时间" prop="updatedTime">
|
|
|
|
<!-- type="date"-->
|
|
|
|
<el-date-picker clearable
|
|
|
|
<!-- value-format="yyyy-MM-dd"-->
|
|
|
|
v-model="form.updatedTime"
|
|
|
|
<!-- placeholder="请选择更新时间">-->
|
|
|
|
type="date"
|
|
|
|
<!-- </el-date-picker>-->
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
placeholder="请选择更新时间">
|
|
|
|
<!-- <el-form-item label="工单编号" prop="orderCode">-->
|
|
|
|
</el-date-picker>
|
|
|
|
<!-- <el-input v-model="form.orderCode" placeholder="请输入工单编号" />-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item label="工单编号" prop="orderCode">
|
|
|
|
|
|
|
|
<el-input v-model="form.orderCode" placeholder="请输入工单编号" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加物料信息对话框 -->
|
|
|
|
|
|
|
|
<el-dialog title="添加物料信息" :visible.sync="materialOpen" width="500px" append-to-body>
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="">确 定</el-button>
|
|
|
|
|
|
|
|
<el-button @click="">取 消</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { listBaseBomInfo, getBaseBomInfo, delBaseBomInfo, addBaseBomInfo, updateBaseBomInfo } from "@/api/production/baseBomInfo";
|
|
|
|
import { listBaseBomInfo, getBaseBomInfo, delBaseBomInfo, addBaseBomInfo, updateBaseBomInfo } from "@/api/production/baseBomInfo";
|
|
|
|
|
|
|
|
import {findFactoryList} from "@//api/base/factory";
|
|
|
|
|
|
|
|
import {findOrderBomList} from "@//api/base/orderBomInfo";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "BaseBomInfo",
|
|
|
|
name: "BaseBomInfo",
|
|
|
@ -251,6 +270,8 @@ export default {
|
|
|
|
title: "",
|
|
|
|
title: "",
|
|
|
|
// 是否显示弹出层
|
|
|
|
// 是否显示弹出层
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
|
|
|
|
// 是否显示物料弹出层
|
|
|
|
|
|
|
|
materialOpen: false,
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
@ -291,11 +312,16 @@ export default {
|
|
|
|
{ key: 12, label: `更新人`, visible: false },
|
|
|
|
{ key: 12, label: `更新人`, visible: false },
|
|
|
|
{ key: 13, label: `更新时间`, visible: false },
|
|
|
|
{ key: 13, label: `更新时间`, visible: false },
|
|
|
|
{ key: 14, label: `工单编号`, visible: true },
|
|
|
|
{ key: 14, label: `工单编号`, visible: true },
|
|
|
|
]
|
|
|
|
],
|
|
|
|
|
|
|
|
// 工厂选项
|
|
|
|
|
|
|
|
factoryList: []
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
findFactoryList().then(response => {
|
|
|
|
|
|
|
|
this.factoryList = response.data;
|
|
|
|
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
/** 查询生产BOM列表 */
|
|
|
|
/** 查询生产BOM列表 */
|
|
|
@ -355,6 +381,12 @@ export default {
|
|
|
|
this.open = true;
|
|
|
|
this.open = true;
|
|
|
|
this.title = "添加生产BOM";
|
|
|
|
this.title = "添加生产BOM";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
|
|
|
handleMaterialAdd() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.materialOpen = true;
|
|
|
|
|
|
|
|
// this.title = "添加订单BOM";
|
|
|
|
|
|
|
|
},
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
handleUpdate(row) {
|
|
|
|
handleUpdate(row) {
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|