change - 添加生产BOM

master
yinq 1 year ago
parent 4c9b610713
commit 0352f398a9

@ -9,6 +9,15 @@ export function listOrderBomInfo(query) {
}) })
} }
// 查询订单BOM下拉框列表
export function findOrderBomList(query) {
return request({
url: '/base/orderBomInfo/findOrderBomList',
method: 'get',
params: query
})
}
// 查询订单BOM详细 // 查询订单BOM详细
export function getOrderBomInfo(objId) { export function getOrderBomInfo(objId) {
return request({ return request({

@ -75,11 +75,11 @@
<dict-tag :options="dict.type.is_ammeter" :value="scope.row.isAmmeter"/> <dict-tag :options="dict.type.is_ammeter" :value="scope.row.isAmmeter"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[10].visible"> <!-- <el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[10].visible">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/> <!-- <dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="创建人" align="center" prop="createdBy" v-if="columns[11].visible"/> <el-table-column label="创建人" align="center" prop="createdBy" v-if="columns[11].visible"/>
<el-table-column label="创建时间" align="center" prop="createdTime" width="180" v-if="columns[12].visible"> <el-table-column label="创建时间" align="center" prop="createdTime" width="180" v-if="columns[12].visible">
<template slot-scope="scope"> <template slot-scope="scope">
@ -180,15 +180,15 @@
>{{dict.label}}</el-radio> >{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="启用标识" prop="isFlag"> <!-- <el-form-item label="启用标识" prop="isFlag">-->
<el-radio-group v-model="form.isFlag"> <!-- <el-radio-group v-model="form.isFlag">-->
<el-radio <!-- <el-radio-->
v-for="dict in dict.type.is_flag" <!-- v-for="dict in dict.type.is_flag"-->
:key="dict.value" <!-- :key="dict.value"-->
:label="parseInt(dict.value)" <!-- :label="parseInt(dict.value)"-->
>{{dict.label}}</el-radio> <!-- >{{dict.label}}</el-radio>-->
</el-radio-group> <!-- </el-radio-group>-->
</el-form-item> <!-- </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>

@ -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();

Loading…
Cancel
Save