Commit f3dab415 authored by 邓春圆's avatar 邓春圆

表单校验

parent b212e0fe
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-card shadow="never"> <el-card shadow="never">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{ $t('渠道信息') }}</span> <span>{{ $t('渠道信息') }}</span>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="可出商品特性"> <el-form-item label="可出商品特性" prop="attrId">
<el-select multiple v-model="form.attrId"> <el-select multiple v-model="form.attrId">
<el-option v-for="(item, index) in attrList" :value="item.id" :label="$l(item, 'attrName')"></el-option> <el-option v-for="(item, index) in attrList" :value="item.id" :label="$l(item, 'attrName')"></el-option>
</el-select> </el-select>
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
</el-row> </el-row>
<div style="display: flex; justify-content: space-between;"> <div style="display: flex; justify-content: space-between;">
<h1> <h1>
<span style="color: red;font-size: 14px;font-weight: 700;">*</span>
渠道包装列表 渠道包装列表
</h1> </h1>
<div> <div>
...@@ -191,7 +192,15 @@ export default { ...@@ -191,7 +192,15 @@ export default {
attrId:[], attrId:[],
}, },
rules: {}, rules: {
nameZh:{required:true,message:'请输入中文名称',trigger:'blur'},
nameEn:{required:true,message:'请输入英文名称',trigger:'blur'},
internalNameZh:{required:true,message:'请输入内部中文名称',trigger:'blur'},
internalNameEn:{required:true,message:'请输入内部英文名称',trigger:'blur'},
typeNumber:{required:true,message:'请输入编码类型',trigger:'blur'},
code:{required:true,message:'请输入简码',trigger:'blur'},
attrId:{required:true,message:'请选择可出商品特性',trigger:'blur'}
},
expressList:[], expressList:[],
warehouseList: [], warehouseList: [],
warehouseIdsArr:[], warehouseIdsArr:[],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment