fix:新增供应商必填校验添加
This commit is contained in:
parent
82f8e5bb6c
commit
7737e18910
|
|
@ -2,13 +2,8 @@
|
||||||
<div class="app-container" id="toolsSupplier">
|
<div class="app-container" id="toolsSupplier">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
<el-form-item label="供应商名称" prop="supplier">
|
<el-form-item label="供应商名称" prop="supplier">
|
||||||
<el-input
|
<el-input v-model="queryParams.supplier" placeholder="请输入供应商名称" clearable maxlength="50" style="width: 240px"
|
||||||
v-model="queryParams.supplier"
|
@keyup.enter.native="handleQuery" />
|
||||||
placeholder="请输入供应商名称"
|
|
||||||
clearable maxlength="50"
|
|
||||||
style="width: 240px"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
|
@ -19,13 +14,7 @@
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">-->
|
<!-- <el-col :span="1.5">-->
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
|
|
@ -50,13 +39,7 @@
|
||||||
<!-- >删除</el-button>-->
|
<!-- >删除</el-button>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">-->
|
<!-- <el-col :span="1.5">-->
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
|
|
@ -82,43 +65,28 @@
|
||||||
<el-table-column label="主要经营范围" align="center" prop="businessScope" :show-overflow-tooltip="true" />
|
<el-table-column label="主要经营范围" align="center" prop="businessScope" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="营业执照" align="center" prop="businessLicense" :show-overflow-tooltip="true">
|
<el-table-column label="营业执照" align="center" prop="businessLicense" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.businessLicense" @click="openImg(scope.row.businessLicense)" style="color: #02A7F0;"> 查看 </span>
|
<span v-if="scope.row.businessLicense" @click="openImg(scope.row.businessLicense)" style="color: #02A7F0;"> 查看
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="状态" align="center" prop="status" width="180">
|
<el-table-column label="状态" align="center" prop="status" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch v-model="scope.row.status">
|
||||||
v-model="scope.row.status">
|
|
||||||
</el-switch>
|
</el-switch>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button size="mini" type="primary" icon="el-icon-edit" @click="handleUpdate(scope.row)">编辑</el-button>
|
||||||
size="mini"
|
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
type="primary"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleUpdate(scope.row)"
|
|
||||||
>编辑</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||||
v-show="total>0"
|
@pagination="getList" />
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
|
||||||
|
|
@ -142,16 +110,9 @@
|
||||||
<el-input v-model="form.businessScope" placeholder="请输入经营范围" maxlength="50" />
|
<el-input v-model="form.businessScope" placeholder="请输入经营范围" maxlength="50" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="营业执照" prop="businessLicense">
|
<el-form-item label="营业执照" prop="businessLicense">
|
||||||
<el-upload
|
<el-upload :http-request="(obj) => imgUpLoad(obj, 'fileUrl')" action="#" :file-list="fileList"
|
||||||
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
|
:show-file-list="false" list-type="picture-card" accept=".png,.jpg,.jpeg" :on-success="handleAvatarSuccess"
|
||||||
action="#"
|
:on-preview="handlePictureCardPreview" :on-remove="handleRemove">
|
||||||
:file-list="fileList"
|
|
||||||
:show-file-list="false"
|
|
||||||
list-type="picture-card"
|
|
||||||
accept=".png,.jpg,.jpeg"
|
|
||||||
:on-success="handleAvatarSuccess"
|
|
||||||
:on-preview="handlePictureCardPreview"
|
|
||||||
:on-remove="handleRemove">
|
|
||||||
<img v-if="imageUrl" :src="uploadUrl + imageUrl" style="width: 140px;height: 140px;" class="avatar">
|
<img v-if="imageUrl" :src="uploadUrl + imageUrl" style="width: 140px;height: 140px;" class="avatar">
|
||||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
|
@ -219,11 +180,8 @@ export default {
|
||||||
uploadUrl: process.env.VUE_APP_BASE_API + "/system", // 上传的图片服务器地址
|
uploadUrl: process.env.VUE_APP_BASE_API + "/system", // 上传的图片服务器地址
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
dictName: [
|
supplier: [
|
||||||
{ required: true, message: "字典名称不能为空", trigger: "blur" }
|
{ required: true, message: "供应商名称不能为空", trigger: "blur" }
|
||||||
],
|
|
||||||
dictType: [
|
|
||||||
{ required: true, message: "字典类型不能为空", trigger: "blur" }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue