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

表单校验

parent b212e0fe
<template>
<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">
<div slot="header" class="clearfix">
<span>{{ $t('渠道信息') }}</span>
......@@ -86,7 +86,7 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="可出商品特性">
<el-form-item label="可出商品特性" prop="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-select>
......@@ -95,6 +95,7 @@
</el-row>
<div style="display: flex; justify-content: space-between;">
<h1>
<span style="color: red;font-size: 14px;font-weight: 700;">*</span>
渠道包装列表
</h1>
<div>
......@@ -191,7 +192,15 @@ export default {
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:[],
warehouseList: [],
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