refactor(供应商管理): 完善
This commit is contained in:
parent
7a9ac420bc
commit
49e6add53b
@ -16,7 +16,8 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['wm:wmsSupplier:add']"
|
||||
>新增</el-button>
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -27,7 +28,8 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['wm:wmsSupplier:edit']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -38,38 +40,21 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['wm:wmsSupplier:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['wm:wmsSupplier:export']"
|
||||
>导出</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="wmsSupplierList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="供应商名称" align="center" prop="supplierName" />
|
||||
<el-table-column label="供应商类型名称" align="center" prop="supplierTypeName" />
|
||||
<el-table-column label="供应商类型编码" align="center" prop="supplierTypeCode" />
|
||||
<el-table-column label="主要联系人姓名" align="center" prop="contactName" />
|
||||
<el-table-column label="联系人电话" align="center" prop="contactPhone" />
|
||||
<el-table-column label="联系人电子邮箱" align="center" prop="contactEmail" />
|
||||
<el-table-column label="联系地址" align="center" prop="contactAddress" />
|
||||
<el-table-column label="供应商所在地理位置/地区" align="center" prop="region" />
|
||||
<el-table-column label="供应商公司官网" align="center" prop="website" />
|
||||
<el-table-column label="供应商公司官网" align="center" prop="createBy" />
|
||||
<el-table-column label="供应商公司官网" align="center" prop="createTime" />
|
||||
<el-table-column label="供应商公司官网" align="center" prop="updateBy" />
|
||||
<el-table-column label="供应商公司官网" align="center" prop="updateTime" />
|
||||
<el-table-column label="供应商公司官网" align="center" prop="isDelete" />
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="主键" align="center" prop="id"/>
|
||||
<el-table-column label="供应商名称" align="center" prop="supplierName"/>
|
||||
<el-table-column label="主要联系人姓名" align="center" prop="contactName"/>
|
||||
<el-table-column label="联系人电话" align="center" prop="contactPhone"/>
|
||||
<el-table-column label="联系人邮箱" align="center" prop="contactEmail"/>
|
||||
<el-table-column label="联系地址" align="center" prop="contactAddress"/>
|
||||
<el-table-column label="供应商公司官网" align="center" prop="website"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -78,14 +63,16 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['wm:wmsSupplier:edit']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wm:wmsSupplier:remove']"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -99,8 +86,26 @@
|
||||
/>
|
||||
|
||||
<!-- 添加或修改供应商基础信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-dialog :title="title" :visible.sync="open" width="35%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px" inline>
|
||||
<el-form-item label="供应商名称" prop="supplierName">
|
||||
<el-input v-model="form.supplierName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="主要联系人" prop="contactName">
|
||||
<el-input v-model="form.contactName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人电话" prop="contactPhone">
|
||||
<el-input v-model="form.contactPhone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人邮箱" prop="contactEmail">
|
||||
<el-input v-model="form.contactEmail"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系地址" prop="contactAddress">
|
||||
<el-input v-model="form.contactAddress"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商官网" prop="website">
|
||||
<el-input v-model="form.website"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -111,7 +116,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listWmsSupplier, getWmsSupplier, delWmsSupplier, addWmsSupplier, updateWmsSupplier } from "@/api/mes/wm/wmsSupplier";
|
||||
import {
|
||||
listWmsSupplier,
|
||||
getWmsSupplier,
|
||||
delWmsSupplier,
|
||||
addWmsSupplier,
|
||||
updateWmsSupplier
|
||||
} from "@/api/mes/wm/wmsSupplier";
|
||||
|
||||
export default {
|
||||
name: "WmsSupplier",
|
||||
@ -139,12 +150,25 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
supplierName: null, supplierTypeName: null, supplierTypeCode: null, contactName: null, contactPhone: null, contactEmail: null, contactAddress: null, region: null, website: null, createBy: null, createTime: null, updateBy: null, updateTime: null, isDelete: null },
|
||||
supplierName: null,
|
||||
supplierTypeName: null,
|
||||
supplierTypeCode: null,
|
||||
contactName: null,
|
||||
contactPhone: null,
|
||||
contactEmail: null,
|
||||
contactAddress: null,
|
||||
region: null,
|
||||
website: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
isDelete: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -168,7 +192,22 @@ export default {
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null, supplierName: null, supplierTypeName: null, supplierTypeCode: null, contactName: null, contactPhone: null, contactEmail: null, contactAddress: null, region: null, website: null, createBy: null, createTime: null, updateBy: null, updateTime: null, isDelete: null };
|
||||
id: null,
|
||||
supplierName: null,
|
||||
supplierTypeName: null,
|
||||
supplierTypeCode: null,
|
||||
contactName: null,
|
||||
contactPhone: null,
|
||||
contactEmail: null,
|
||||
contactAddress: null,
|
||||
region: null,
|
||||
website: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
isDelete: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -184,7 +223,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
@ -226,12 +265,13 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除供应商基础信息编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除供应商基础信息编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delWmsSupplier(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
Loading…
Reference in New Issue
Block a user