|
@@ -8,10 +8,7 @@
|
|
|
ref="form"
|
|
|
label-width="100px"
|
|
|
>
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.productClassify')"
|
|
|
- prop="classifyId"
|
|
|
- >
|
|
|
+ <el-form-item label="产品分类" prop="classifyId">
|
|
|
<el-cascader
|
|
|
:options="selectList"
|
|
|
v-model="form.classifyId"
|
|
@@ -21,10 +18,7 @@
|
|
|
size="small"
|
|
|
></el-cascader>
|
|
|
</el-form-item>
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.productType')"
|
|
|
- prop="type"
|
|
|
- >
|
|
|
+ <el-form-item label="产品类型" prop="type">
|
|
|
<el-radio-group v-model="form.type">
|
|
|
<el-radio-button
|
|
|
v-for="item in productTypeList"
|
|
@@ -37,14 +31,8 @@
|
|
|
</el-form-item>
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.productCode')"
|
|
|
- prop="code"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="form.code"
|
|
|
- :placeholder="$t('pleaseInput')"
|
|
|
- ></el-input>
|
|
|
+ <el-form-item label="产品编码" prop="code">
|
|
|
+ <el-input v-model="form.code" placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="18">
|
|
@@ -53,24 +41,18 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.productName')"
|
|
|
- prop="name"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="form.name"
|
|
|
- :placeholder="$t('pleaseInput')"
|
|
|
- ></el-input>
|
|
|
+ <el-form-item label="产品名称" prop="name">
|
|
|
+ <el-input v-model="form.name" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="规格" prop="specs">
|
|
|
+ <el-input v-model="form.specs" placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.productUnit')"
|
|
|
- prop="unit"
|
|
|
- >
|
|
|
+ <el-form-item label="产品单位" prop="unit">
|
|
|
<el-select
|
|
|
v-model="form.unit"
|
|
|
- :placeholder="$t('pleaseSelect')"
|
|
|
+ placeholder="请选择"
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
<el-option
|
|
@@ -86,51 +68,39 @@
|
|
|
</el-row>
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.jdPurchasePrice')"
|
|
|
- prop="jdPurchasePrice"
|
|
|
- >
|
|
|
+ <el-form-item label="京东供价" prop="jdPurchasePrice">
|
|
|
<el-input
|
|
|
v-model="form.jdPurchasePrice"
|
|
|
- :placeholder="$t('pleaseInput')"
|
|
|
+ placeholder="请输入"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.sellingPrice')"
|
|
|
- prop="sellingPrice"
|
|
|
- >
|
|
|
+ <el-form-item label="标准售价" prop="sellingPrice">
|
|
|
<el-input
|
|
|
v-model="form.sellingPrice"
|
|
|
- :placeholder="$t('pleaseInput')"
|
|
|
+ placeholder="请输入"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.purchasePrice')"
|
|
|
- prop="purchasePrice"
|
|
|
- >
|
|
|
+ <el-form-item label="标准采购价" prop="purchasePrice">
|
|
|
<el-input
|
|
|
v-model="form.purchasePrice"
|
|
|
- :placeholder="$t('pleaseInput')"
|
|
|
+ placeholder="请输入"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.clearancePeriod')"
|
|
|
- prop="clearancePeriod"
|
|
|
- >
|
|
|
+ <el-form-item label="库存清空期限" prop="clearancePeriod">
|
|
|
<el-date-picker
|
|
|
v-model="form.clearancePeriod"
|
|
|
type="datetime"
|
|
|
- :placeholder="$t('pleaseSelect')"
|
|
|
+ placeholder="请选择"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
>
|
|
|
</el-date-picker>
|
|
@@ -150,115 +120,100 @@
|
|
|
<i class="el-icon-plus"></i>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.combination')"
|
|
|
- prop="combination"
|
|
|
- >
|
|
|
+ <el-form-item label="是否组合" prop="combination">
|
|
|
<el-radio-group v-model="form.combination">
|
|
|
- <el-radio-button label="1">
|
|
|
- {{ $t("product_material.product.yes") }}</el-radio-button
|
|
|
- >
|
|
|
- <el-radio-button label="0">
|
|
|
- {{ $t("product_material.product.no") }}</el-radio-button
|
|
|
- >
|
|
|
+ <el-radio-button label="1"> 是</el-radio-button>
|
|
|
+ <el-radio-button label="0"> 否</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <div style="margin-bottom: 20px" v-if="form.combination === '1'">
|
|
|
- <labelTitle
|
|
|
- :content="$t('product_material.product.combinationDetails')"
|
|
|
- ></labelTitle>
|
|
|
+ <div style="margin-top: 20px" v-if="form.combination === '1'">
|
|
|
+ <labelTitle content="组合明细"></labelTitle>
|
|
|
</div>
|
|
|
<el-form-item label-width="0px" v-if="form.combination === '1'">
|
|
|
- <el-button @click="selectDialog = true">
|
|
|
- {{ $t("select") }}</el-button
|
|
|
- >
|
|
|
+ <el-button size="small" @click="selectDialog = true"> 选择</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="form.combination === '1'">
|
|
|
<el-table :data="form.productCombinationList">
|
|
|
- <el-table-column
|
|
|
- :label="$t('product_material.product.productCode')"
|
|
|
- prop="code"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- :label="$t('product_material.product.productName')"
|
|
|
- prop="name"
|
|
|
- >
|
|
|
+ <el-table-column label="产品编码" prop="code"> </el-table-column>
|
|
|
+ <el-table-column label="产品名称" prop="name"> </el-table-column>
|
|
|
+ <el-table-column label="本次入库" prop="linkQuantity">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ :prop="
|
|
|
+ 'productCombinationList.' + scope.$index + '.linkQuantity'
|
|
|
+ "
|
|
|
+ :rules="formRules.linkQuantity"
|
|
|
+ :inline-message="true"
|
|
|
+ label-width="0"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.linkQuantity"
|
|
|
+ placeholder="请输入"
|
|
|
+ size="mini"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- :label="$t('operation')"
|
|
|
- width="100"
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ <el-table-column label="操作" width="100" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" @click="deleteRow(scope.$index)">{{
|
|
|
- $t("delete")
|
|
|
- }}</el-button>
|
|
|
+ <el-button type="text" @click="deleteRow(scope.$index)"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-form-item>
|
|
|
- <div style="margin-bottom: 20px">
|
|
|
- <labelTitle
|
|
|
- :content="$t('product_material.product.lifeCycleRules')"
|
|
|
- ></labelTitle>
|
|
|
+ <div style="margin-top: 20px">
|
|
|
+ <labelTitle content="生命周期规则"></labelTitle>
|
|
|
</div>
|
|
|
<el-row :gutter="10">
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.newProductsExpectedSales')"
|
|
|
- prop="newProductsExpectedSales"
|
|
|
- >
|
|
|
+ <el-form-item label="新品期" prop="newProductsExpectedSales">
|
|
|
<el-col :span="2" style="text-align: center">
|
|
|
0 ~
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
<el-input
|
|
|
v-model="form.newProductsDay"
|
|
|
- :placeholder="$t('pleaseInput')"
|
|
|
+ placeholder="请输入"
|
|
|
></el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="1" style="text-align: center"> : </el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-input
|
|
|
v-model="form.newProductsExpectedSales"
|
|
|
- :placeholder="$t('pleaseInput')"
|
|
|
+ placeholder="预期销量"
|
|
|
></el-input>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row :gutter="10">
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.growUpExpectedSales')"
|
|
|
- prop="growUpExpectedSales"
|
|
|
- >
|
|
|
+ <el-form-item label="成长期" prop="growUpExpectedSales">
|
|
|
<el-col :span="2" style="text-align: center">
|
|
|
61 ~
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
<el-input
|
|
|
v-model="form.growUpDay"
|
|
|
- :placeholder="$t('pleaseInput')"
|
|
|
+ placeholder="请输入"
|
|
|
></el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="1" style="text-align: center"> : </el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-input
|
|
|
v-model="form.growUpExpectedSales"
|
|
|
- :placeholder="$t('pleaseInput')"
|
|
|
+ placeholder="预期销量"
|
|
|
></el-input>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-form-item
|
|
|
- :label="$t('product_material.product.matureExpectedSales')"
|
|
|
- prop="matureExpectedSales"
|
|
|
- >
|
|
|
+ <el-form-item label="成熟期" prop="matureExpectedSales">
|
|
|
<el-col :span="3"> 大于120天 : </el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-input
|
|
|
v-model="form.matureExpectedSales"
|
|
|
- :placeholder="$t('pleaseInput')"
|
|
|
+ placeholder="预期销量"
|
|
|
></el-input>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
@@ -266,16 +221,14 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div style="text-align: center; margin-top: 15px">
|
|
|
- <el-button size="small" @click="handleCancel"
|
|
|
- >{{ $t("cancel") }}
|
|
|
- </el-button>
|
|
|
+ <el-button size="small" @click="handleCancel">取消 </el-button>
|
|
|
<el-button type="primary" size="small" @click="handleSubmit">
|
|
|
- {{ $t("submit") }}</el-button
|
|
|
+ 确定</el-button
|
|
|
>
|
|
|
</div>
|
|
|
|
|
|
<el-dialog
|
|
|
- :title="$t('productSelect')"
|
|
|
+ title="产品选择"
|
|
|
v-if="selectDialog"
|
|
|
:visible.sync="selectDialog"
|
|
|
width="80%"
|
|
@@ -314,69 +267,57 @@ export default {
|
|
|
selectList: [],
|
|
|
productTypeList: [],
|
|
|
productUnitList: [],
|
|
|
- form: {
|
|
|
- classifyId: "",
|
|
|
- deptId: "",
|
|
|
- type: "",
|
|
|
- code: "",
|
|
|
- name: "",
|
|
|
- unit: "",
|
|
|
- combination: "",
|
|
|
- purchasePrice: "",
|
|
|
- sellingPrice: "",
|
|
|
- jdPurchasePrice: "",
|
|
|
- newProductsDay: "",
|
|
|
- growUpDay: "",
|
|
|
- newProductsExpectedSales: "",
|
|
|
- growUpExpectedSales: "",
|
|
|
- matureExpectedSales: "",
|
|
|
- clearancePeriod: "",
|
|
|
- productCombinationList: [],
|
|
|
- },
|
|
|
|
|
|
formRules: {
|
|
|
classifyId: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: this.$t("product_material.product.productClassifyRules"),
|
|
|
+ message: "请选择产品分类",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
type: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: this.$t("product_material.product.productTypeRules"),
|
|
|
+ message: "请选择产品类型",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
- // code: [
|
|
|
- // {
|
|
|
- // required: true,
|
|
|
- // message: this.$t("product_material.product.productCodeRules"),
|
|
|
- // trigger: "blur",
|
|
|
- // },
|
|
|
- // ],
|
|
|
unit: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: this.$t("product_material.product.productUnitRules"),
|
|
|
+ message: "请选择产品单位",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
name: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: this.$t("product_material.product.productNameRules"),
|
|
|
+ message: "请输入产品名称",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ specs: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入规格",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
combination: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: this.$t("product_material.product.combinationRules"),
|
|
|
+ message: "请选择是否组合",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
+ linkQuantity: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入数量",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
selectDialog: false,
|
|
|
};
|
|
@@ -428,11 +369,11 @@ export default {
|
|
|
code: row.code,
|
|
|
name: row.name,
|
|
|
});
|
|
|
- this.msgSuccess(this.$t("addSuccess"));
|
|
|
+ this.msgSuccess("添加成功");
|
|
|
},
|
|
|
deleteRow(index) {
|
|
|
this.form.productCombinationList.splice(index, 1);
|
|
|
- this.msgSuccess(this.$t("deleteSuccess"));
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
},
|
|
|
},
|
|
|
};
|
|
@@ -445,4 +386,12 @@ export default {
|
|
|
box-sizing: border-box;
|
|
|
padding: 10px;
|
|
|
}
|
|
|
+::v-deep {
|
|
|
+ .el-form-item {
|
|
|
+ margin-bottom: 3px;
|
|
|
+ }
|
|
|
+ .el-form--label-top .el-form-item__label {
|
|
|
+ padding: 8px 0 0 0;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|