李靖 1 year ago
commit 82ee5db859

@ -1,6 +1,6 @@
import request from '@/utils/request' import request from '@/utils/request'
// 查询BOM物料管理列表 // 查询BOM管理 列表
export function listBom(query) { export function listBom(query) {
return request({ return request({
url: '/wms/bom/list', url: '/wms/bom/list',
@ -9,7 +9,7 @@ export function listBom(query) {
}); });
} }
// 查询BOM物料管理详细 // 查询BOM管理 详细
export function getBom(factoryCode) { export function getBom(factoryCode) {
return request({ return request({
url: '/wms/bom/' + factoryCode, url: '/wms/bom/' + factoryCode,
@ -17,16 +17,7 @@ export function getBom(factoryCode) {
}); });
} }
// 查询BOM物料管理列表 // 新增BOM管理
export function listBomComponent(query) {
return request({
url: '/wms/bomComponent/list',
method: 'get',
params: query
});
}
// 新增BOM物料管理
export function addBom(data) { export function addBom(data) {
return request({ return request({
url: '/wms/bom', url: '/wms/bom',
@ -35,7 +26,7 @@ export function addBom(data) {
}); });
} }
// 修改BOM物料管理 // 修改BOM管理
export function updateBom(data) { export function updateBom(data) {
return request({ return request({
url: '/wms/bom', url: '/wms/bom',
@ -44,7 +35,7 @@ export function updateBom(data) {
}); });
} }
// 删除BOM物料管理 // 删除BOM管理
export function delBom(factoryCode) { export function delBom(factoryCode) {
return request({ return request({
url: '/wms/bom/' + factoryCode, url: '/wms/bom/' + factoryCode,

@ -839,7 +839,8 @@ export default {
shiftId: this.splitForm.shiftId, shiftId: this.splitForm.shiftId,
splitNum: this.splitForm.splitNum, splitNum: this.splitForm.splitNum,
product: this.productData[0], product: this.productData[0],
routeCode: this.splitForm.routeCode routeCode: this.splitForm.routeCode,
carNum: this.splitForm.carNum
} }
subSplitOrder(data).then(response => { subSplitOrder(data).then(response => {
@ -1112,6 +1113,12 @@ export default {
handleAdd(row) { handleAdd(row) {
console.log("点击了新增按钮"); console.log("点击了新增按钮");
// TODO // TODO
this.materielQueryParams = {
productCode: null,
productDescZh: null,
pageNum: 1,
pageSize: 10,
},
// //
this.form.prodType = 'white' this.form.prodType = 'white'
// //

@ -15,7 +15,6 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<!--
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -60,34 +59,55 @@
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>--> </el-row>
<el-table <el-table v-loading="loading" :data="bomList" @selection-change="handleSelectionChange">
v-loading="loading" <el-table-column type="selection" width="55" align="center"/>
:data="bomList" <el-table-column label="BOM单号" align="center" prop="bomCode" width="120"/>
@selection-change="handleSelectionChange" <el-table-column label="产品号" align="center" prop="productCode" width="120"/>
row-key="bomCode" <el-table-column label="产品名称" align="center" prop="productDescZh" width="350"/>
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" <el-table-column label="组件编码" align="center" prop="component" width="120"/>
> <el-table-column label="组件名称" align="center" prop="componentDescZh" width="350"/>
<el-table-column type="selection" align="center" /> <el-table-column label="组件上层编码" align="center" prop="cumc" width="120"/>
<!-- 序号 --> <el-table-column label="可选BOM" align="center" prop="optionalBom" width="120"/>
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column> <el-table-column label="可选BOM文本" align="center" prop="optionalBomText" width="120"/>
<el-table-column label="BOM单号" width="120" align="center" prop="bomCode" /> <el-table-column label="生产版本" align="center" prop="productionVersion" width="120"/>
<el-table-column label="物料编码" width="200" align="center" prop="productCode" /> <el-table-column label="生产版本有效期" align="center" prop="pvvd" width="180">
<el-table-column label="组件上层物料编码" width="200" align="center" prop="cumc" /> <template slot-scope="scope">
<el-table-column label="组件编码" width="120" align="center" prop="component" /> <span>{{ parseTime(scope.row.pvvd, '{y}-{m}-{d}') }}</span>
<el-table-column label="BOM层次" align="center" prop="bomHierarchy" /> </template>
<el-table-column label="项目编号" align="center" prop="projectNo" /> </el-table-column>
<el-table-column label="标准用量" align="center" prop="standardDosage" /> <el-table-column label="生产版本截止日期" align="center" prop="pved" width="180">
<el-table-column label="损耗率" align="center" prop="lossRate" /> <template slot-scope="scope">
<el-table-column label="损耗额" align="center" prop="lossAmount" /> <span>{{ parseTime(scope.row.pved, '{y}-{m}-{d}') }}</span>
<el-table-column label="含损耗用量" align="center" prop="cilosses" /> </template>
<el-table-column label="组件数量单位" align="center" prop="componentUnit" /> </el-table-column>
<el-table-column label="组件采购标志" align="center" prop="componentProFlag" /> <el-table-column label="BOM计算数量" align="center" prop="bomCalculateNumber" width="120"/>
<el-table-column label="物料供应标识" align="center" prop="msi"/> <el-table-column label="BOM计算单位" align="center" prop="bomCalculateUnit" width="120"/>
<el-table-column label="成本核算标识相关" align="center" prop="sanka"/> <el-table-column label="BOM基本数量" align="center" prop="bomBaseNumber" width="120"/>
<el-table-column label="创建人" align="center" prop="createBy" /> <el-table-column label="BOM基本单位" align="center" prop="bomBaseUnit" width="120"/>
<el-table-column label="创建时间" width="200" align="center" prop="createTime" /> <el-table-column label="组件数量单位" align="center" prop="componentUnit" width="120"/>
<el-table-column label="组件采购标志" align="center" prop="componentProFlag" width="120"/>
<el-table-column label="物料供应标识" align="center" prop="msi" width="120"/>
<el-table-column label="成本核算标识相关" align="center" prop="sanka" width="150"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['wms:bom:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['wms:bom:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
@ -97,11 +117,91 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改BOM管理 对话框 -->
<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="工厂" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂" />
</el-form-item>
<el-form-item label="生产版本" prop="productionVersion">
<el-input v-model="form.productionVersion" placeholder="请输入生产版本" />
</el-form-item>
<el-form-item label="BOM单号" prop="bomCode">
<el-input v-model="form.bomCode" placeholder="请输入BOM单号" />
</el-form-item>
<el-form-item label="可选BOM" prop="optionalBom">
<el-input v-model="form.optionalBom" placeholder="请输入可选BOM" />
</el-form-item>
<el-form-item label="可选BOM文本" prop="optionalBomText">
<el-input v-model="form.optionalBomText" placeholder="请输入可选BOM文本" />
</el-form-item>
<el-form-item label="生产版本有效期" prop="pvvd">
<el-date-picker clearable
v-model="form.pvvd"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择生产版本有效期">
</el-date-picker>
</el-form-item>
<el-form-item label="生产版本截止日期" prop="pved">
<el-date-picker clearable
v-model="form.pved"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择生产版本截止日期">
</el-date-picker>
</el-form-item>
<el-form-item label="BOM计算数量" prop="bomCalculateNumber">
<el-input v-model="form.bomCalculateNumber" placeholder="请输入BOM计算数量" />
</el-form-item>
<el-form-item label="BOM计算单位" prop="bomCalculateUnit">
<el-input v-model="form.bomCalculateUnit" placeholder="请输入BOM计算单位" />
</el-form-item>
<el-form-item label="BOM基本数量" prop="bomBaseNumber">
<el-input v-model="form.bomBaseNumber" placeholder="请输入BOM基本数量" />
</el-form-item>
<el-form-item label="BOM基本单位" prop="bomBaseUnit">
<el-input v-model="form.bomBaseUnit" placeholder="请输入BOM基本单位" />
</el-form-item>
<el-form-item label="组件数量单位" prop="componentUnit">
<el-input v-model="form.componentUnit" placeholder="请输入组件数量单位" />
</el-form-item>
<el-form-item label="组件采购标志" prop="componentProFlag">
<el-input v-model="form.componentProFlag" placeholder="请输入组件采购标志" />
</el-form-item>
<el-form-item label="物料供应标识" prop="msi">
<el-input v-model="form.msi" placeholder="请输入物料供应标识" />
</el-form-item>
<el-form-item label="成本核算标识相关" prop="sanka">
<el-input v-model="form.sanka" placeholder="请输入成本核算标识相关" />
</el-form-item>
<el-form-item label="预留字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入预留字段1" />
</el-form-item>
<el-form-item label="预留字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入预留字段2" />
</el-form-item>
<el-form-item label="预留字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入预留字段3" />
</el-form-item>
<el-form-item label="是否在用" prop="currentVersion">
<el-input v-model="form.currentVersion" placeholder="请输入是否在用" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" 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>
</div> </div>
</template> </template>
<script> <script>
import { listBom, getBom, delBom, addBom, updateBom,listBomComponent} from "@/api/wms/bom"; import { listBom, getBom, delBom, addBom, updateBom } from "@/api/wms/bom";
export default { export default {
name: "Bom", name: "Bom",
@ -119,7 +219,7 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// BOM // BOM
bomList: [], bomList: [],
// //
title: "", title: "",
@ -147,14 +247,14 @@ export default {
attr1: null, attr1: null,
attr2: null, attr2: null,
attr3: null, attr3: null,
currentVersion: null currentVersion: null,
}, },
// //
form: {}, form: {},
// //
rules: { rules: {
createTime: [ bomCode: [
{ required: true, message: "创建时间不能为空", trigger: "blur" } { required: true, message: "BOM单号不能为空", trigger: "blur" }
], ],
} }
}; };
@ -163,14 +263,10 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
// /** 查询BOM管理 列表 */
indexMethod(index){
return index+1 ;
},
/** 查询BOM物料管理列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listBomComponent(this.queryParams).then(response => { listBom(this.queryParams).then(response => {
this.bomList = response.rows; this.bomList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -206,8 +302,8 @@ export default {
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
remark: null, currentVersion: null,
currentVersion: null remark: null
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -231,7 +327,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加BOM物料管理"; this.title = "添加BOM管理 ";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -240,7 +336,7 @@ export default {
getBom(factoryCode).then(response => { getBom(factoryCode).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改BOM物料管理"; this.title = "修改BOM管理 ";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
@ -266,7 +362,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const factoryCodes = row.factoryCode || this.ids; const factoryCodes = row.factoryCode || this.ids;
this.$modal.confirm('是否确认删除BOM物料管理编号为"' + factoryCodes + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除BOM管理 编号为"' + factoryCodes + '"的数据项?').then(function() {
return delBom(factoryCodes); return delBom(factoryCodes);
}).then(() => { }).then(() => {
this.getList(); this.getList();

@ -218,7 +218,7 @@
</el-form> </el-form>
<el-divider></el-divider> <el-divider></el-divider>
<el-card> <el-card>
<div style="text-align: center"> <div style="text-align: center" >
<template> <template>
<el-transfer <el-transfer
filterable filterable
@ -335,13 +335,15 @@ export default {
}, },
getTeamMembers() { getTeamMembers() {
// //
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 2000;
listTeamMembers(this.queryParams).then(response => { listTeamMembers(this.queryParams).then(response => {
console.log(response.rows); console.log(response.rows);
for(let i in response.rows){ for(let i in response.rows){
// 穿 // 穿
this.leftList.push({ this.leftList.push({
key: response.rows[i].userId, key: response.rows[i].userId,
label: response.rows[i].userName label: response.rows[i].teamUserName
}) })
} }
for(let i in response.selected){ for(let i in response.selected){
@ -499,3 +501,13 @@ export default {
} }
}; };
</script> </script>
<style>
.el-transfer-panel{
width: 320px;
height: 400px;
}
.el-transfer-panel__list.is-filterable{
height: 300px;
}
</style>

Loading…
Cancel
Save