parent
5c2aea11c3
commit
7a212ed527
@ -0,0 +1,187 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="物料编码" prop="materialCode">
|
||||
<el-input
|
||||
v-model="queryParams.materialCode"
|
||||
placeholder="请输入物料编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="物料名称" prop="materialName">
|
||||
<el-input
|
||||
v-model="queryParams.materialName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料类型" prop="materialTypeId">
|
||||
<el-input
|
||||
v-model="queryParams.materialTypeId"
|
||||
placeholder="请输入物料类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次标识" prop="batchFlag">
|
||||
<el-select v-model="queryParams.batchFlag" placeholder="请选择批次标识" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.active_flag"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="materialinfoList" @selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
highlight-current-row>
|
||||
<el-table-column type="selection" width="55" align="center" v-if="false" />
|
||||
<el-table-column label="物料ID" align="center" prop="materialId" v-if="false"/>
|
||||
<el-table-column label="物料编码" align="center" prop="materialCode"/>
|
||||
<el-table-column label="物料名称" align="center" prop="materialName"/>
|
||||
<el-table-column label="物料大类" align="center" prop="materialCategories">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.material_categories" :value="scope.row.materialCategories"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料类型" align="center" prop="materialTypeName"/>
|
||||
<el-table-column label="常备物料" align="center" prop="bindFlag">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mes_material_bind_flag" :value="scope.row.bindFlag"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次标识" align="center" prop="batchFlag">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.active_flag" :value="scope.row.batchFlag"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次数量" align="center" prop="batchAmount"/>
|
||||
<el-table-column label="物料规格" align="center" prop="materialSpec"/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listMaterialinfo,
|
||||
} from "@/api/mes/materialinfo";
|
||||
|
||||
export default {
|
||||
name: "Materialinfo",
|
||||
dicts: ['active_flag', 'material_categories','mes_material_bind_flag'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 物料类型信息树选项
|
||||
baseMaterialTypeOptions: [],
|
||||
// 物料信息表格数据
|
||||
materialinfoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
erpId: null,
|
||||
materialCode: null,
|
||||
oldMaterialCode: null,
|
||||
materialName: null,
|
||||
materialCategories: null,
|
||||
materialSubclass: null,
|
||||
materialTypeId: null,
|
||||
batchFlag: null,
|
||||
materialUnitId: null,
|
||||
materialUnit: null,
|
||||
materialMatkl: null,
|
||||
materialSpec: null,
|
||||
netWeight: null,
|
||||
grossWeight: null,
|
||||
factoryId: null,
|
||||
createOrgId: null,
|
||||
useOrgId: null,
|
||||
prodlineId: null,
|
||||
activeFlag: null,
|
||||
deletedFlag: null,
|
||||
approveDate: null,
|
||||
erpModifyDate: null
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询物料信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listMaterialinfo(this.queryParams).then(response => {
|
||||
this.materialinfoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.materialId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
||||
//选中列赋值
|
||||
handleRowClick(row) {
|
||||
this.selectedRow = row
|
||||
},
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue