基础信息产品管理

master
A0010407 1 year ago
parent 98ed09ee04
commit 5943f82707

@ -1,18 +1,18 @@
<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="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px">
<el-form-item label="产品编码" prop="productCode"> <el-form-item label="产品/物料编码" prop="productCode">
<el-input <el-input
v-model="queryParams.productCode" v-model="queryParams.productCode"
placeholder="请输入产品编码" placeholder="请输入产品/物料编码"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="产品名称" prop="productDescZh"> <el-form-item label="产品/物料名称" prop="productDescZh">
<el-input <el-input
v-model="queryParams.productDescZh" v-model="queryParams.productDescZh"
placeholder="请输入产品名称" placeholder="请输入产品/物料名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -73,10 +73,15 @@
<el-table v-loading="loading" :data="productList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="productList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键ID" align="center" prop="productId" /> --> <!-- <el-table-column label="主键ID" align="center" prop="productId" /> -->
<el-table-column label="产品编码" align="center" prop="productCode" width="200"/> <el-table-column label="产品/物料编码" align="center" prop="productCode" width="200"/>
<el-table-column label="产品名称" align="center" prop="productDescZh" width="400"/> <el-table-column label="产品/物料名称" align="center" prop="productDescZh" width="400"/>
<el-table-column label="产品组名称" align="center" prop="productGroupName" width="200"/> <el-table-column label="物料组编码" align="center" prop="productGroup" width="150"/>
<el-table-column label="产品组" align="center" prop="productGroup" /> <el-table-column label="物料组名称" align="center" prop="productGroupName" width="200"/>
<el-table-column label="物料类别" align="center" prop="mtart">
<template slot-scope="scope">
{{ scope.row.mtart == "material_type1" ? "料罐物料" : "其他类别" }}
</template>
</el-table-column>
<!-- 中文描述也就是产品名称 --> <!-- 中文描述也就是产品名称 -->
<!-- <el-table-column label="英文描述" align="center" prop="productDescEn" /> <!-- <el-table-column label="英文描述" align="center" prop="productDescEn" />
<el-table-column label="产品类别" align="center" prop="productGroup"> <el-table-column label="产品类别" align="center" prop="productGroup">
@ -145,18 +150,24 @@
<!-- 添加或修改产品信息对话框 --> <!-- 添加或修改产品信息对话框 -->
<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="120px">
<el-form-item label="产品编码" prop="productCode"> <el-form-item label="产品/物料编码" prop="productCode">
<el-input v-model="form.productCode" placeholder="请输入产品编码" style="width:350px"/> <el-input v-model="form.productCode" placeholder="请输入产品编码" style="width:320px"/>
</el-form-item>
<el-form-item label="产品/物料名称" prop="productDescZh">
<el-input v-model="form.productDescZh" placeholder="请输入产品名称" style="width:320px"/>
</el-form-item>
<el-form-item label="产品/物料型号" prop="productModel">
<el-input v-model="form.productModel" placeholder="请输入产品型号" style="width:320px"/>
</el-form-item> </el-form-item>
<el-form-item label="产品名称" prop="productDescZh"> <el-form-item label="产品/物料组编码" prop="productGroup">
<el-input v-model="form.productDescZh" placeholder="请输入产品名称" style="width:350px"/> <el-input v-model="form.productGroup" placeholder="请输入物料组编码" style="width:320px"/>
</el-form-item> </el-form-item>
<el-form-item label="产品型号" prop="productModel"> <el-form-item label="产品/物料组名称" prop="productGroupName">
<el-input v-model="form.productModel" placeholder="请输入产品型号" style="width:350px"/> <el-input v-model="form.productGroupName" placeholder="请输入物料组名称" style="width:320px"/>
</el-form-item> </el-form-item>
<el-form-item label="产品类别" prop="productGroup"> <el-form-item label="物料类别" prop="mtart">
<el-select v-model="form.productGroup" placeholder="请选择产品类别" style="width:350px"> <el-select v-model="form.mtart" placeholder="请选择物料类别" style="width:320px">
<el-option <el-option
v-for="dict in dict.type.material_type" v-for="dict in dict.type.material_type"
:key="dict.value" :key="dict.value"
@ -232,7 +243,7 @@
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" /> <el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item> --> </el-form-item> -->
<el-form-item label="是否启用" prop="activeFlag"> <el-form-item label="是否启用" prop="activeFlag">
<el-select v-model="form.activeFlag" placeholder="请选择是否启用" @change="$forceUpdate()" clearable style="width:350px"> <el-select v-model="form.activeFlag" placeholder="请选择是否启用" @change="$forceUpdate()" clearable style="width:320px">
<el-option v-for="item in options" :key="item.activeFlag" :label="item.label" :value="item.activeFlag"></el-option> <el-option v-for="item in options" :key="item.activeFlag" :label="item.label" :value="item.activeFlag"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -487,7 +498,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const productIds = row.productId || this.ids; const productIds = row.productId || this.ids;
this.$modal.confirm('是否确认删除产品信息编号为"' + productIds + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除产品/物料信息编号为"' + productIds + '"的数据项?').then(function() {
return delProduct(productIds); return delProduct(productIds);
}).then(() => { }).then(() => {
this.getList(); this.getList();

Loading…
Cancel
Save