|
|
|
@ -1,18 +1,18 @@
|
|
|
|
|
<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="productCode">
|
|
|
|
|
<el-form-item label="产品编码" prop="productCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.productCode"
|
|
|
|
|
placeholder="请输入物料编码"
|
|
|
|
|
placeholder="请输入产品编码"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物料名称" prop="productDescZh">
|
|
|
|
|
<el-form-item label="产品名称" prop="productDescZh">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.productDescZh"
|
|
|
|
|
placeholder="请输入物料名称"
|
|
|
|
|
placeholder="请输入产品名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
@ -73,19 +73,19 @@
|
|
|
|
|
<el-table v-loading="loading" :data="productList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<!-- <el-table-column label="主键ID" align="center" prop="productId" /> -->
|
|
|
|
|
<el-table-column label="物料编码" align="center" prop="productCode" />
|
|
|
|
|
<el-table-column label="物料类别" align="center" prop="productGroup">
|
|
|
|
|
<el-table-column label="产品编码" align="center" prop="productCode" width="200"/>
|
|
|
|
|
<el-table-column label="产品类别" align="center" prop="productGroup">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.productGroup == "material_type1" ? "物料类别1" : "物料类别2" }}
|
|
|
|
|
{{ scope.row.productGroup == "material_type1" ? "产品类别1" : "产品类别2" }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- 中文描述也就是物料名称 -->
|
|
|
|
|
<el-table-column label="物料名称" align="center" prop="productDescZh" />
|
|
|
|
|
<el-table-column label="物料型号" align="center" prop="productModel" />
|
|
|
|
|
<!-- 中文描述也就是产品名称 -->
|
|
|
|
|
<el-table-column label="产品名称" align="center" prop="productDescZh" width="400"/>
|
|
|
|
|
<el-table-column label="产品型号" align="center" prop="productModel" />
|
|
|
|
|
<!-- <el-table-column label="英文描述" align="center" prop="productDescEn" />
|
|
|
|
|
<el-table-column label="序列号规则代码" align="center" prop="ruleCode" />
|
|
|
|
|
<el-table-column label="旧物料号" align="center" prop="oldProductCode" />
|
|
|
|
|
<el-table-column label="散件物料号" align="center" prop="partsProductCode" />
|
|
|
|
|
<el-table-column label="旧产品号" align="center" prop="oldProductCode" />
|
|
|
|
|
<el-table-column label="散件产品号" align="center" prop="partsProductCode" />
|
|
|
|
|
<el-table-column label="69码" align="center" prop="skuBarcode" />
|
|
|
|
|
<el-table-column label="长" align="center" prop="length" />
|
|
|
|
|
<el-table-column label="宽" align="center" prop="width" />
|
|
|
|
@ -120,7 +120,7 @@
|
|
|
|
|
<el-table-column label="是否补料" align="center" prop="appendFlag" />
|
|
|
|
|
<el-table-column label="补料比例" align="center" prop="appendPercent" /> -->
|
|
|
|
|
<el-table-column label="创建人" align="center" prop="createBy" />
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" />
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="200"/>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
@ -149,20 +149,20 @@
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改物料信息对话框 -->
|
|
|
|
|
<!-- 添加或修改产品信息对话框 -->
|
|
|
|
|
<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="productCode">
|
|
|
|
|
<el-input v-model="form.productCode" placeholder="请输入产品代码" />
|
|
|
|
|
<el-form-item label="产品编码" prop="productCode">
|
|
|
|
|
<el-input v-model="form.productCode" placeholder="请输入产品代码" style="width:350px"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物料名称" prop="productDescZh">
|
|
|
|
|
<el-input v-model="form.productDescZh" placeholder="请输入物料名称" />
|
|
|
|
|
<el-form-item label="产品名称" prop="productDescZh">
|
|
|
|
|
<el-input v-model="form.productDescZh" placeholder="请输入产品名称" style="width:350px"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物料型号" prop="productModel">
|
|
|
|
|
<el-input v-model="form.productModel" placeholder="请输入物料名称" />
|
|
|
|
|
<el-form-item label="产品型号" prop="productModel">
|
|
|
|
|
<el-input v-model="form.productModel" placeholder="请输入产品型号" style="width:350px"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物料类别" prop="productGroup">
|
|
|
|
|
<el-select v-model="form.productGroup" placeholder="请选择物料类别">
|
|
|
|
|
<el-form-item label="产品类别" prop="productGroup">
|
|
|
|
|
<el-select v-model="form.productGroup" placeholder="请选择产品类别" style="width:350px">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.material_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
@ -177,11 +177,11 @@
|
|
|
|
|
<el-form-item label="序列号规则代码" prop="ruleCode">
|
|
|
|
|
<el-input v-model="form.ruleCode" placeholder="请输入序列号规则代码" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="旧物料号" prop="oldProductCode">
|
|
|
|
|
<el-input v-model="form.oldProductCode" placeholder="请输入旧物料号" />
|
|
|
|
|
<el-form-item label="旧产品号" prop="oldProductCode">
|
|
|
|
|
<el-input v-model="form.oldProductCode" placeholder="请输入旧产品号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="散件物料号" prop="partsProductCode">
|
|
|
|
|
<el-input v-model="form.partsProductCode" placeholder="请输入散件物料号" />
|
|
|
|
|
<el-form-item label="散件产品号" prop="partsProductCode">
|
|
|
|
|
<el-input v-model="form.partsProductCode" placeholder="请输入散件产品号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="69码" prop="skuBarcode">
|
|
|
|
|
<el-input v-model="form.skuBarcode" placeholder="请输入69码" />
|
|
|
|
@ -238,7 +238,7 @@
|
|
|
|
|
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<el-form-item label="是否启用" prop="activeFlag">
|
|
|
|
|
<el-select v-model="form.activeFlag" placeholder="请选择是否启用" @change="$forceUpdate()" clearable>
|
|
|
|
|
<el-select v-model="form.activeFlag" placeholder="请选择是否启用" @change="$forceUpdate()" clearable style="width:350px">
|
|
|
|
|
<el-option v-for="item in options" :key="item.activeFlag" :label="item.label" :value="item.activeFlag"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -304,7 +304,7 @@ export default {
|
|
|
|
|
showSearch: true,
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
// 物料信息表格数据
|
|
|
|
|
// 产品信息表格数据
|
|
|
|
|
productList: [],
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: "",
|
|
|
|
@ -376,7 +376,7 @@ export default {
|
|
|
|
|
indexMethod(index) {
|
|
|
|
|
return index + 1;
|
|
|
|
|
},
|
|
|
|
|
/** 查询物料信息列表 */
|
|
|
|
|
/** 查询产品信息列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
listProduct(this.queryParams).then(response => {
|
|
|
|
@ -458,7 +458,7 @@ export default {
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加物料信息";
|
|
|
|
|
this.title = "添加产品信息";
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
@ -467,7 +467,7 @@ export default {
|
|
|
|
|
getProduct(productId).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改物料信息";
|
|
|
|
|
this.title = "修改产品信息";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
@ -493,7 +493,7 @@ export default {
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
const productIds = row.productId || this.ids;
|
|
|
|
|
this.$modal.confirm('是否确认删除物料信息编号为"' + productIds + '"的数据项?').then(function() {
|
|
|
|
|
this.$modal.confirm('是否确认删除产品信息编号为"' + productIds + '"的数据项?').then(function() {
|
|
|
|
|
return delProduct(productIds);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|