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详细
export function getOrderBomInfo(objId) {
return request({

@ -75,11 +75,11 @@
<dict-tag :options="dict.type.is_ammeter" :value="scope.row.isAmmeter"/>
</template>
</el-table-column>
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[10].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
</template>
</el-table-column>
<!-- <el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[10].visible">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<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">
<template slot-scope="scope">
@ -180,15 +180,15 @@
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="启用标识" prop="isFlag">
<el-radio-group v-model="form.isFlag">
<el-radio
v-for="dict in dict.type.is_flag"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="启用标识" prop="isFlag">-->
<!-- <el-radio-group v-model="form.isFlag">-->
<!-- <el-radio-->
<!-- v-for="dict in dict.type.is_flag"-->
<!-- :key="dict.value"-->
<!-- :label="parseInt(dict.value)"-->
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>

@ -1,10 +1,10 @@
<template>
<div class="app-container">
<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
v-model="queryParams.materialCode"
placeholder="请输入物料编号"
placeholder="请输入物料编号"
clearable
@keyup.enter.native="handleQuery"
/>
@ -91,7 +91,7 @@
<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="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="materialType" v-if="columns[4].visible">
<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="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="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="isFlag" v-if="columns[9].visible">
<template slot-scope="scope">
@ -152,13 +152,25 @@
<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-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 label="子物料编号" prop="materialCode">
<el-input v-model="form.materialCode" placeholder="请输入子物料编号" />
<el-form-item label="所属工厂">
<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 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 label="物料类型" prop="materialType">
<el-select v-model="form.materialType" placeholder="请选择物料类型">
@ -170,63 +182,70 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="标准数量" prop="standardAmount">
<el-input v-model="form.standardAmount" placeholder="请输入标准数量" />
</el-form-item>
<el-form-item label="父物料编号" prop="parentId">
<el-input v-model="form.parentId" placeholder="请输入父物料编号" />
</el-form-item>
<el-form-item label="工厂编号" prop="plantCode">
<el-input v-model="form.plantCode" placeholder="请输入工厂编号" />
</el-form-item>
<el-form-item label="产线/工位" prop="productLineCode">
<el-input v-model="form.productLineCode" placeholder="请输入产线/工位" />
</el-form-item>
<el-form-item label="是否标识" prop="isFlag">
<el-radio-group v-model="form.isFlag">
<el-radio
v-for="dict in dict.type.is_flag"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="创建人" prop="createdBy">
<el-input v-model="form.createdBy" placeholder="请输入创建人" />
</el-form-item>
<el-form-item label="创建时间" prop="createdTime">
<el-date-picker clearable
v-model="form.createdTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择创建时间">
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updatedBy">
<el-input v-model="form.updatedBy" placeholder="请输入更新人" />
</el-form-item>
<el-form-item label="更新时间" prop="updatedTime">
<el-date-picker clearable
v-model="form.updatedTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择更新时间">
</el-date-picker>
</el-form-item>
<el-form-item label="工单编号" prop="orderCode">
<el-input v-model="form.orderCode" placeholder="请输入工单编号" />
</el-form-item>
<!-- <el-form-item label="标准数量" prop="standardAmount">-->
<!-- <el-input v-model="form.standardAmount" placeholder="请输入标准数量" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="父物料编号" prop="parentId">-->
<!-- <el-input v-model="form.parentId" placeholder="请输入父物料编号" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="产线/工位" prop="productLineCode">-->
<!-- <el-input v-model="form.productLineCode" placeholder="请输入产线/工位" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="是否标识" prop="isFlag">-->
<!-- <el-radio-group v-model="form.isFlag">-->
<!-- <el-radio-->
<!-- v-for="dict in dict.type.is_flag"-->
<!-- :key="dict.value"-->
<!-- :label="parseInt(dict.value)"-->
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="创建人" prop="createdBy">-->
<!-- <el-input v-model="form.createdBy" placeholder="请输入创建人" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="创建时间" prop="createdTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.createdTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择创建时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="更新人" prop="updatedBy">-->
<!-- <el-input v-model="form.updatedBy" placeholder="请输入更新人" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="更新时间" prop="updatedTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.updatedTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择更新时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="工单编号" prop="orderCode">-->
<!-- <el-input v-model="form.orderCode" placeholder="请输入工单编号" />-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</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>
</template>
<script>
import { listBaseBomInfo, getBaseBomInfo, delBaseBomInfo, addBaseBomInfo, updateBaseBomInfo } from "@/api/production/baseBomInfo";
import {findFactoryList} from "@//api/base/factory";
import {findOrderBomList} from "@//api/base/orderBomInfo";
export default {
name: "BaseBomInfo",
@ -251,6 +270,8 @@ export default {
title: "",
//
open: false,
//
materialOpen: false,
//
queryParams: {
pageNum: 1,
@ -291,11 +312,16 @@ export default {
{ key: 12, label: `更新人`, visible: false },
{ key: 13, label: `更新时间`, visible: false },
{ key: 14, label: `工单编号`, visible: true },
]
],
//
factoryList: []
};
},
created() {
this.getList();
findFactoryList().then(response => {
this.factoryList = response.data;
});
},
methods: {
/** 查询生产BOM列表 */
@ -355,6 +381,12 @@ export default {
this.open = true;
this.title = "添加生产BOM";
},
/** 新增按钮操作 */
handleMaterialAdd() {
this.materialOpen = true;
// this.title = "BOM";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();

Loading…
Cancel
Save