Merge remote-tracking branch 'origin/master'
commit
18a9ecf921
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询工艺附件管理列表
|
||||
export function listBaseFile(query) {
|
||||
return request({
|
||||
url: '/mes/pro/baseFile/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询工艺附件管理详细
|
||||
export function getBaseFile(fileId) {
|
||||
return request({
|
||||
url: '/mes/pro/baseFile/' + fileId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增工艺附件管理
|
||||
export function addBaseFile(data) {
|
||||
return request({
|
||||
url: '/mes/pro/baseFile',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改工艺附件管理
|
||||
export function updateBaseFile(data) {
|
||||
return request({
|
||||
url: '/mes/pro/baseFile',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除工艺附件管理
|
||||
export function delBaseFile(fileId) {
|
||||
return request({
|
||||
url: '/mes/pro/baseFile/' + fileId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -1,53 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询工艺线体关联列表
|
||||
export function listLine(query) {
|
||||
export function listProduct(query) {
|
||||
return request({
|
||||
url: '/mes/pro/routeprodline/list',
|
||||
url: '/mes/pro/routeprodproduct/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询工艺线体关联详细
|
||||
export function getLine(recordId) {
|
||||
export function getProduct(recordId) {
|
||||
return request({
|
||||
url: '/mes/pro/routeprodline/' + recordId,
|
||||
url: '/mes/pro/routeprodproduct/' + recordId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增工艺线体关联
|
||||
export function addLine(data) {
|
||||
export function addProduct(data) {
|
||||
return request({
|
||||
url: '/mes/pro/routeprodline',
|
||||
url: '/mes/pro/routeprodproduct',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改工艺线体关联
|
||||
export function updateLine(data) {
|
||||
export function updateProduct(data) {
|
||||
return request({
|
||||
url: '/mes/pro/routeprodline',
|
||||
url: '/mes/pro/routeprodproduct',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除工艺线体关联
|
||||
export function delLine(recordId) {
|
||||
export function delProduct(recordId) {
|
||||
return request({
|
||||
url: '/mes/pro/routeprodline/' + recordId,
|
||||
url: '/mes/pro/routeprodproduct/' + recordId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询工艺线体关联列表
|
||||
export function getListLine(query) {
|
||||
export function getListProduct(query) {
|
||||
return request({
|
||||
url: '/mes/pro/routeprodline/getList',
|
||||
url: '/mes/pro/routeprodproduct/getList',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询物料BOM管理列表
|
||||
export function listBom(query) {
|
||||
return request({
|
||||
url: '/wms/bom/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询物料BOM管理详细
|
||||
export function getBom(bomItemId) {
|
||||
return request({
|
||||
url: '/wms/bom/' + bomItemId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增物料BOM管理
|
||||
export function addBom(data) {
|
||||
return request({
|
||||
url: '/wms/bom',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改物料BOM管理
|
||||
export function updateBom(data) {
|
||||
return request({
|
||||
url: '/wms/bom',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除物料BOM管理
|
||||
export function delBom(bomItemId) {
|
||||
return request({
|
||||
url: '/wms/bom/' + bomItemId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询客户管理列表
|
||||
export function listCustomer(query) {
|
||||
return request({
|
||||
url: '/wms/customer/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询客户管理详细
|
||||
export function getCustomer(clientId) {
|
||||
return request({
|
||||
url: '/wms/customer/' + clientId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增客户管理
|
||||
export function addCustomer(data) {
|
||||
return request({
|
||||
url: '/wms/customer',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改客户管理
|
||||
export function updateCustomer(data) {
|
||||
return request({
|
||||
url: '/wms/customer',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除客户管理
|
||||
export function delCustomer(clientId) {
|
||||
return request({
|
||||
url: '/wms/customer/' + clientId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备管理列表
|
||||
export function listEquipment(query) {
|
||||
return request({
|
||||
url: '/wms/equipment/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备管理详细
|
||||
export function getEquipment(equipmentId) {
|
||||
return request({
|
||||
url: '/wms/equipment/' + equipmentId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增设备管理
|
||||
export function addEquipment(data) {
|
||||
return request({
|
||||
url: '/wms/equipment',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改设备管理
|
||||
export function updateEquipment(data) {
|
||||
return request({
|
||||
url: '/wms/equipment',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除设备管理
|
||||
export function delEquipment(equipmentId) {
|
||||
return request({
|
||||
url: '/wms/equipment/' + equipmentId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备绑定产品列表
|
||||
export function listEquipmentBoundMaterials(query) {
|
||||
return request({
|
||||
url: '/wms/equipmentBoundMaterials/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询设备绑定产品详细
|
||||
export function getEquipmentBoundMaterials(equipmentId) {
|
||||
return request({
|
||||
url: '/wms/equipmentBoundMaterials/' + equipmentId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增设备绑定产品
|
||||
export function addEquipmentBoundMaterials(data) {
|
||||
return request({
|
||||
url: '/wms/equipmentBoundMaterials',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改设备绑定产品
|
||||
export function updateEquipmentBoundMaterials(data) {
|
||||
return request({
|
||||
url: '/wms/equipmentBoundMaterials',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除设备绑定产品
|
||||
export function delEquipmentBoundMaterials(equipmentId) {
|
||||
return request({
|
||||
url: '/wms/equipmentBoundMaterials/' + equipmentId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询机台管理列表
|
||||
export function listMachinery(query) {
|
||||
return request({
|
||||
url: '/wms/machinery/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询机台管理详细
|
||||
export function getMachinery(machineryId) {
|
||||
return request({
|
||||
url: '/wms/machinery/' + machineryId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增机台管理
|
||||
export function addMachinery(data) {
|
||||
return request({
|
||||
url: '/wms/machinery',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改机台管理
|
||||
export function updateMachinery(data) {
|
||||
return request({
|
||||
url: '/wms/machinery',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除机台管理
|
||||
export function delMachinery(machineryId) {
|
||||
return request({
|
||||
url: '/wms/machinery/' + machineryId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询物料信息列表
|
||||
export function listProduct(query) {
|
||||
return request({
|
||||
url: '/wms/product/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询物料信息详细
|
||||
export function getProduct(productId) {
|
||||
return request({
|
||||
url: '/wms/product/' + productId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增物料信息
|
||||
export function addProduct(data) {
|
||||
return request({
|
||||
url: '/wms/product',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改物料信息
|
||||
export function updateProduct(data) {
|
||||
return request({
|
||||
url: '/wms/product',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除物料信息
|
||||
export function delProduct(productId) {
|
||||
return request({
|
||||
url: '/wms/product/' + productId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询物料分组列表
|
||||
export function listProductGroups(query) {
|
||||
return request({
|
||||
url: '/wms/productGroups/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询物料分组详细
|
||||
export function getProductGroups(pgId) {
|
||||
return request({
|
||||
url: '/wms/productGroups/' + pgId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增物料分组
|
||||
export function addProductGroups(data) {
|
||||
return request({
|
||||
url: '/wms/productGroups',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改物料分组
|
||||
export function updateProductGroups(data) {
|
||||
return request({
|
||||
url: '/wms/productGroups',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除物料分组
|
||||
export function delProductGroups(pgId) {
|
||||
return request({
|
||||
url: '/wms/productGroups/' + pgId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询供应商管理列表
|
||||
export function listSupplier(query) {
|
||||
return request({
|
||||
url: '/wms/supplier/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询供应商管理详细
|
||||
export function getSupplier(supplierId) {
|
||||
return request({
|
||||
url: '/wms/supplier/' + supplierId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增供应商管理
|
||||
export function addSupplier(data) {
|
||||
return request({
|
||||
url: '/wms/supplier',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改供应商管理
|
||||
export function updateSupplier(data) {
|
||||
return request({
|
||||
url: '/wms/supplier',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除供应商管理
|
||||
export function delSupplier(supplierId) {
|
||||
return request({
|
||||
url: '/wms/supplier/' + supplierId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
@ -0,0 +1,293 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="附件名称" prop="fileName">
|
||||
<el-input
|
||||
v-model="queryParams.fileName"
|
||||
placeholder="请输入附件名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:pro:baseFile:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:pro:baseFile:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:pro:baseFile: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="['mes:pro:baseFile:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="baseFileList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="附件名称" align="center" prop="fileName" />
|
||||
<el-table-column label="附件地址" align="center" prop="fileAddress" />
|
||||
<el-table-column label="工艺编码" align="center" prop="" />
|
||||
<el-table-column label="工艺名称" align="center" prop="" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:pro:baseFile:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:pro:baseFile:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改工艺附件管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="附件" prop="fileList">
|
||||
<FileUpload v-model="form.fileList"/>
|
||||
</el-form-item>
|
||||
<template>
|
||||
<el-button @click="toggleSelection()">取消选择</el-button>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="日期"
|
||||
width="120">
|
||||
<template slot-scope="scope">{{ scope.row.date }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="姓名"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="地址"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listBaseFile, getBaseFile, delBaseFile, addBaseFile, updateBaseFile } from "@/api/mes/pro/baseFile";
|
||||
|
||||
export default {
|
||||
name: "BaseFile",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 工艺附件管理表格数据
|
||||
baseFileList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
fileName: null,
|
||||
fileAddress: null,
|
||||
sourceId: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询工艺附件管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listBaseFile(this.queryParams).then(response => {
|
||||
this.baseFileList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
fileId: null,
|
||||
fileName: null,
|
||||
fileAddress: null,
|
||||
sourceId: null,
|
||||
remark: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.fileId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加工艺附件管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const fileId = row.fileId || this.ids
|
||||
getBaseFile(fileId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改工艺附件管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.fileId != null) {
|
||||
updateBaseFile(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addBaseFile(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const fileIds = row.fileId || this.ids;
|
||||
this.$modal.confirm('是否确认删除工艺附件管理编号为"' + fileIds + '"的数据项?').then(function() {
|
||||
return delBaseFile(fileIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/pro/baseFile/export', {
|
||||
...this.queryParams
|
||||
}, `baseFile_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,444 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="客户编码" prop="clientCode">
|
||||
<el-input
|
||||
v-model="queryParams.clientCode"
|
||||
placeholder="请输入客户编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="clientName">
|
||||
<el-input
|
||||
v-model="queryParams.clientName"
|
||||
placeholder="请输入客户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['wms:customer:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['wms:customer:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['wms:customer: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="['wms:customer:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="客户ID" align="center" prop="clientId" />
|
||||
<el-table-column label="客户编码" align="center" prop="clientCode" />
|
||||
<el-table-column label="客户名称" align="center" prop="clientName" />
|
||||
<el-table-column label="客户简称" align="center" prop="clientNick" />
|
||||
<el-table-column label="客户英文名称" align="center" prop="clientEn" width="100"/>
|
||||
<el-table-column label="客户简介" align="center" prop="clientDes" />
|
||||
<el-table-column label="客户LOGO地址" align="center" prop="clientLogo" width="120"/>
|
||||
<el-table-column label="客户类型" align="center" prop="clientType" />
|
||||
<el-table-column label="客户地址" align="center" prop="address" />
|
||||
<el-table-column label="客户官网地址" align="center" prop="website" width="100"/>
|
||||
<el-table-column label="客户邮箱地址" align="center" prop="email" width="100"/>
|
||||
<el-table-column label="客户电话" align="center" prop="tel" />
|
||||
<el-table-column label="联系人1" align="center" prop="contact1" />
|
||||
<el-table-column label="联系人1-电话" align="center" prop="contact1Tel" width="120"/>
|
||||
<el-table-column label="联系人1-邮箱" align="center" prop="contact1Email" width="120"/>
|
||||
<el-table-column label="联系人2" align="center" prop="contact2" />
|
||||
<el-table-column label="联系人2-电话" align="center" prop="contact2Tel" width="120"/>
|
||||
<el-table-column label="联系人2-邮箱" align="center" prop="contact2Email" width="120"/>
|
||||
<el-table-column label="统一社会信用代码" align="center" prop="creditCode" width="130"/>
|
||||
<el-table-column label="是否启用" align="center" prop="enableFlag" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['wms:customer:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wms:customer:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改客户管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户编码" prop="clientCode">
|
||||
<el-input v-model="form.clientCode" placeholder="请输入客户编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称" prop="clientName">
|
||||
<el-input v-model="form.clientName" placeholder="请输入客户名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户简称" prop="clientNick">
|
||||
<el-input v-model="form.clientNick" placeholder="请输入客户简称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户英文名称" prop="clientEn">
|
||||
<el-input v-model="form.clientEn" placeholder="请输入客户英文名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户简介" prop="clientDes">
|
||||
<el-input v-model="form.clientDes" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户LOGO地址" prop="clientLogo">
|
||||
<el-input v-model="form.clientLogo" placeholder="请输入客户LOGO地址" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户地址" prop="address">
|
||||
<el-input v-model="form.address" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户官网地址" prop="website">
|
||||
<el-input v-model="form.website" placeholder="请输入客户官网地址" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户邮箱地址" prop="email">
|
||||
<el-input v-model="form.email" placeholder="请输入客户邮箱地址" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户电话" prop="tel">
|
||||
<el-input v-model="form.tel" placeholder="请输入客户电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人1" prop="contact1">
|
||||
<el-input v-model="form.contact1" placeholder="请输入联系人1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人1-电话" prop="contact1Tel">
|
||||
<el-input v-model="form.contact1Tel" placeholder="请输入联系人1-电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人1-邮箱" prop="contact1Email">
|
||||
<el-input v-model="form.contact1Email" placeholder="请输入联系人1-邮箱" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人2" prop="contact2">
|
||||
<el-input v-model="form.contact2" placeholder="请输入联系人2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人2-电话" prop="contact2Tel">
|
||||
<el-input v-model="form.contact2Tel" placeholder="请输入联系人2-电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人2-邮箱" prop="contact2Email">
|
||||
<el-input v-model="form.contact2Email" placeholder="请输入联系人2-邮箱" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="统一社会信用代码" prop="creditCode">
|
||||
<el-input v-model="form.creditCode" placeholder="请输入统一社会信用代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否启用" prop="enableFlag">
|
||||
<el-input v-model="form.enableFlag" placeholder="请输入是否启用" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCustomer, getCustomer, delCustomer, addCustomer, updateCustomer } from "@/api/wms/customer";
|
||||
|
||||
export default {
|
||||
name: "Customer",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 客户管理表格数据
|
||||
customerList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
clientCode: null,
|
||||
clientName: null,
|
||||
clientNick: null,
|
||||
clientEn: null,
|
||||
clientDes: null,
|
||||
clientLogo: null,
|
||||
clientType: null,
|
||||
address: null,
|
||||
website: null,
|
||||
email: null,
|
||||
tel: null,
|
||||
contact1: null,
|
||||
contact1Tel: null,
|
||||
contact1Email: null,
|
||||
contact2: null,
|
||||
contact2Tel: null,
|
||||
contact2Email: null,
|
||||
creditCode: null,
|
||||
enableFlag: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
clientCode: [
|
||||
{ required: true, message: "客户编码不能为空", trigger: "blur" }
|
||||
],
|
||||
clientName: [
|
||||
{ required: true, message: "客户名称不能为空", trigger: "blur" }
|
||||
],
|
||||
enableFlag: [
|
||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询客户管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCustomer(this.queryParams).then(response => {
|
||||
this.customerList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
clientId: null,
|
||||
clientCode: null,
|
||||
clientName: null,
|
||||
clientNick: null,
|
||||
clientEn: null,
|
||||
clientDes: null,
|
||||
clientLogo: null,
|
||||
clientType: null,
|
||||
address: null,
|
||||
website: null,
|
||||
email: null,
|
||||
tel: null,
|
||||
contact1: null,
|
||||
contact1Tel: null,
|
||||
contact1Email: null,
|
||||
contact2: null,
|
||||
contact2Tel: null,
|
||||
contact2Email: null,
|
||||
creditCode: null,
|
||||
enableFlag: null,
|
||||
remark: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.clientId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加客户管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const clientId = row.clientId || this.ids
|
||||
getCustomer(clientId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改客户管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.clientId != null) {
|
||||
updateCustomer(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCustomer(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const clientIds = row.clientId || this.ids;
|
||||
this.$modal.confirm('是否确认删除客户管理编号为"' + clientIds + '"的数据项?').then(function() {
|
||||
return delCustomer(clientIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wms/customer/export', {
|
||||
...this.queryParams
|
||||
}, `customer_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,427 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="设备编码" prop="equipmentCode">
|
||||
<el-input
|
||||
v-model="queryParams.equipmentCode"
|
||||
placeholder="请输入设备编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="equipmentName">
|
||||
<el-input
|
||||
v-model="queryParams.equipmentName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品编码" prop="productCode">
|
||||
<el-input
|
||||
v-model="queryParams.productCode"
|
||||
placeholder="请输入产品编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名称" prop="productDescZh">
|
||||
<el-input
|
||||
v-model="queryParams.productDescZh"
|
||||
placeholder="请输入产品名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['wms:product:list']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['wms:equipmentBoundMaterials:edit']"
|
||||
>修改</el-button> -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['wms:equipmentBoundMaterials: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="['wms:equipmentBoundMaterials:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="equipmentBoundMaterialsList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- 序号 -->
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="90"
|
||||
align="center"
|
||||
:index="indexMethod"
|
||||
label="序号">
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编码" align="center" prop="productCode" />
|
||||
<el-table-column label="物料名称" align="center" prop="productDescZh" />
|
||||
<el-table-column label="物料型号" align="center" prop="productModel" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['wms:equipmentBoundMaterials:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wms:equipmentBoundMaterials:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改设备绑定产品对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-table v-loading="loading" :data="productList" @selection-change="handleSelectionProductChange">
|
||||
<el-table-column type="selection" width="55" align="center" /> -->
|
||||
<!-- 序号 -->
|
||||
<!-- <el-table-column
|
||||
type="index"
|
||||
width="90"
|
||||
align="center"
|
||||
:index="indexMethod"
|
||||
label="序号"> -->
|
||||
<!-- </el-table-column>
|
||||
<el-table-column label="物料编码" align="center" prop="form.productCode" />
|
||||
<el-table-column label="物料名称" align="center" prop="form.productDescZh" />
|
||||
<el-table-column label="物料型号" align="center" prop="form.productModel" />
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleProductQuery"
|
||||
v-hasPermi="['wms:product:list']"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-form> -->
|
||||
|
||||
<el-form :model="form" :rules="rules" ref="form" label-width="110px">
|
||||
<el-table v-loading="loading" :data="productList" @selection-change="handleSelectionProductChange" >
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- 序号 -->
|
||||
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
|
||||
<el-table-column label="物料编码" align="center" prop="productCode" />
|
||||
<el-table-column label="物料型号" align="center" prop="form.productModel" />
|
||||
</el-table>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleProductQuery"
|
||||
v-hasPermi="['wms:product:list']"
|
||||
></el-button>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryProductParams.pageNum"
|
||||
:limit.sync="queryProductParams.pageSize"
|
||||
@pagination="getProductList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEquipmentBoundMaterials, getEquipmentBoundMaterials, delEquipmentBoundMaterials, addEquipmentBoundMaterials, updatEquipmentBoundMaterials } from "@/api/wms/equipmentBoundMaterials";
|
||||
import { listProduct, getProduct, delProduct, addProduct, updateProduct } from "@/api/wms/product";
|
||||
export default {
|
||||
name: "EquipmentBoundMaterials",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 遮罩层
|
||||
// productLoading: true,
|
||||
// 选中数组
|
||||
// productIds: [],
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非单个禁用
|
||||
// productSingle: true,
|
||||
// 非多个禁用
|
||||
// productMultiple: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 总条数
|
||||
// total: 0,
|
||||
// 物料信息表格数据
|
||||
productList: [],
|
||||
// 设备绑定产品表格数据
|
||||
equipmentBoundMaterialsList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
equipmentCode: null,
|
||||
equipmentName: null,
|
||||
productCode: null,
|
||||
productDescZh: null,
|
||||
equipmentTypeId: null,
|
||||
equipmentTypeCode: null,
|
||||
equipmentTypeName: null,
|
||||
workshopId: null,
|
||||
workshopCode: null,
|
||||
workshopName: null,
|
||||
status: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
},
|
||||
queryProductParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
productId: null,
|
||||
productCode: null,
|
||||
productDescZh: null,
|
||||
productModel:null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
equipmentCode: [
|
||||
{ required: true, message: "设备编码不能为空", trigger: "blur" }
|
||||
],
|
||||
productCode: [
|
||||
{ required: true, message: "产品编码不能为空", trigger: "blur" }
|
||||
],
|
||||
productDescZh: [
|
||||
{ required: true, message: "产品名称不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getProductList();
|
||||
},
|
||||
methods: {
|
||||
// 生成表头序号
|
||||
indexMethod(index){
|
||||
return index+1 ;
|
||||
},
|
||||
/** 查询设备绑定产品列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listEquipmentBoundMaterials(this.queryParams).then(response => {
|
||||
this. equipmentBoundMaterialsList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 查询物料信息列表 */
|
||||
getProductList() {
|
||||
this.loading = true;
|
||||
listProduct(this.queryProductParams).then(response => {
|
||||
this.productList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
productId: null,
|
||||
productCode: null,
|
||||
productDescZh: null,
|
||||
productModel:null,
|
||||
equipmentId: null,
|
||||
equipmentCode: null,
|
||||
equipmentName: null,
|
||||
productCode: null,
|
||||
productDescZh: null,
|
||||
equipmentTypeId: null,
|
||||
equipmentTypeCode: null,
|
||||
equipmentTypeName: null,
|
||||
workshopId: null,
|
||||
workshopCode: null,
|
||||
workshopName: null,
|
||||
status: null,
|
||||
remark: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleProductQuery() {
|
||||
this.queryProductParams.pageNum = 1;
|
||||
this.getProductList();
|
||||
console.log(this.form);
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionProductChange(selection) {
|
||||
this.ids = selection.map(item => item.productId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.equipmentId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
// this.queryProductParams.pageNum = 1;
|
||||
// this.getProductList();
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加设备绑定产品";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
// handleUpdate(row) {
|
||||
// this.reset();
|
||||
// const equipmentId = row.equipmentId || this.ids
|
||||
// getEquipmentBoundMaterials(equipmentId).then(response => {
|
||||
// this.form = response.data;
|
||||
// this.open = true;
|
||||
// this.title = "修改设备绑定产品";
|
||||
// });
|
||||
// },
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
console.log(this.form.equipmentId);
|
||||
if (this.form.equipmentId != null) {
|
||||
// updateEquipmentBoundMaterials(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
// } else
|
||||
// if(this.form.productId != null){
|
||||
addEquipmentBoundMaterials(this.form).then(response => {
|
||||
this.$modal.msgSuccess("绑定成功");
|
||||
this.open = false;
|
||||
this.getProductList();
|
||||
});
|
||||
}
|
||||
// else {
|
||||
// addEquipmentBoundMaterials(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
// }
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const equipmentIds = row.equipmentId || this.ids;
|
||||
this.$modal.confirm('是否确认删除设备绑定产品编号为"' + equipmentIds + '"的数据项?').then(function() {
|
||||
return delEquipmentBoundMaterials(equipmentIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wms/equipmentBoundMaterials/export', {
|
||||
...this.queryParams
|
||||
}, ` equipmentBoundMaterials_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,428 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px">
|
||||
<el-form-item label="设备编码" prop="equipmentCode">
|
||||
<el-input
|
||||
v-model="queryParams.equipmentCode"
|
||||
placeholder="请输入设备编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="equipmentName">
|
||||
<el-input
|
||||
v-model="queryParams.equipmentName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['wms:equipment:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['wms:equipment:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['wms:equipment: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="['wms:equipment:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="equipmentList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- 序号 -->
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="90"
|
||||
align="center"
|
||||
:index="indexMethod"
|
||||
label="序号">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备编码" align="center" prop="equipmentCode">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['wms:equipment:query']"
|
||||
>{{scope.row.equipmentCode}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" align="center" prop="equipmentName" />
|
||||
<el-table-column label="规格型号" align="center" prop="equipmentSpec" />
|
||||
<el-table-column label="设备类型ID" align="center" prop="equipmentTypeId" width="100"/>
|
||||
<el-table-column label="设备类型编码" align="center" prop="equipmentTypeCode" width="100" />
|
||||
<el-table-column label="设备类型名称" align="center" prop="equipmentTypeName" width="100"/>
|
||||
<el-table-column label="所属车间ID" align="center" prop="workshopId" width="100"/>
|
||||
<el-table-column label="所属车间编码" align="center" prop="workshopCode" width="100"/>
|
||||
<el-table-column label="所属车间名称" align="center" prop="workshopName" width="100"/>
|
||||
<el-table-column label="设备状态" align="center" prop="status" />
|
||||
<el-table-column label="单台能力工时" align="center" prop="unitWorkingHours" width="100"/>
|
||||
<el-table-column label="工段" align="center" prop="workshopSection" />
|
||||
<el-table-column label="设备位置" align="center" prop="equipmentLocation" />
|
||||
<el-table-column label="工时单价" align="center" prop="hourlyUnitPrice" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['wms:equipment:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wms:equipment:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改设备管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备编码" prop="equipmentCode">
|
||||
<el-input v-model="form.equipmentCode" placeholder="请输入设备类型编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备名称" prop="equipmentName">
|
||||
<el-input v-model="form.equipmentName" placeholder="请输入设备类型名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规格型号" prop="equipmentSpec">
|
||||
<el-input v-model="form.equipmentSpec" placeholder="请输入规格型号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备类型名称" prop="equipmentTypeName">
|
||||
<el-input v-model="form.equipmentTypeName" placeholder="请输入设备类型名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属车间编码" prop="workshopCode">
|
||||
<el-input v-model="form.workshopCode" placeholder="请输入所属车间编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属车间名称" prop="workshopName">
|
||||
<el-input v-model="form.workshopName" placeholder="请输入所属车间名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单台能力工时" prop="unitWorkingHours">
|
||||
<el-input v-model="form.unitWorkingHours" placeholder="请输入单台能力工时" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工段" prop="workshopSection">
|
||||
<el-input v-model="form.workshopSection" placeholder="请输入工段" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备位置" prop="equipmentLocation">
|
||||
<el-input v-model="form.equipmentLocation" placeholder="请输入设备位置" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工时单价" prop="hourlyUnitPrice">
|
||||
<el-input v-model="form.hourlyUnitPrice" placeholder="请输入工时单价" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-tabs type="border-card" v-if="form.equipmentCode != null">
|
||||
<el-tab-pane label="设备绑定物料">
|
||||
<EquipmentBoundMaterials v-if="form.equipmentCode != null" :optType="optType" :equipmentCode="form.equipmentCode"></EquipmentBoundMaterials>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEquipment, getEquipment, delEquipment, addEquipment, updateEquipment } from "@/api/wms/equipment";
|
||||
import EquipmentBoundMaterials from "./equipmentBoundMaterials";
|
||||
export default {
|
||||
name: "Equipment",
|
||||
components: {EquipmentBoundMaterials},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备管理表格数据
|
||||
equipmentList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
equipmentCode: null,
|
||||
equipmentName: null,
|
||||
equipmentBrand: null,
|
||||
equipmentSpec: null,
|
||||
equipmentTypeId: null,
|
||||
equipmentTypeCode: null,
|
||||
equipmentTypeName: null,
|
||||
workshopId: null,
|
||||
workshopCode: null,
|
||||
workshopName: null,
|
||||
status: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
unitWorkingHours: null,
|
||||
workshopSection: null,
|
||||
equipmentLocation: null,
|
||||
hourlyUnitPrice: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
equipmentCode: [
|
||||
{ required: true, message: "设备类型编码不能为空", trigger: "blur" }
|
||||
],
|
||||
equipmentName: [
|
||||
{ required: true, message: "设备类型名称不能为空", trigger: "blur" }
|
||||
],
|
||||
equipmentTypeId: [
|
||||
{ required: true, message: "设备类型ID不能为空", trigger: "blur" }
|
||||
],
|
||||
workshopId: [
|
||||
{ required: true, message: "所属车间ID不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "设备状态不能为空", trigger: "change" }
|
||||
],
|
||||
unitWorkingHours: [
|
||||
{ required: true, message: "单台能力工时不能为空", trigger: "blur" }
|
||||
],
|
||||
workshopSection: [
|
||||
{ required: true, message: "工段不能为空", trigger: "blur" }
|
||||
],
|
||||
equipmentLocation: [
|
||||
{ required: true, message: "设备位置不能为空", trigger: "blur" }
|
||||
],
|
||||
hourlyUnitPrice: [
|
||||
{ required: true, message: "工时单价不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 生成表头序号
|
||||
indexMethod(index){
|
||||
return index+1 ;
|
||||
},
|
||||
/** 查询设备管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listEquipment(this.queryParams).then(response => {
|
||||
this.equipmentList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
equipmentId: null,
|
||||
equipmentCode: null,
|
||||
equipmentName: null,
|
||||
equipmentBrand: null,
|
||||
equipmentSpec: null,
|
||||
equipmentTypeId: null,
|
||||
equipmentTypeCode: null,
|
||||
equipmentTypeName: null,
|
||||
workshopId: null,
|
||||
workshopCode: null,
|
||||
workshopName: null,
|
||||
status: null,
|
||||
remark: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
unitWorkingHours: null,
|
||||
workshopSection: null,
|
||||
equipmentLocation: null,
|
||||
hourlyUnitPrice: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.equipmentId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加设备管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const equipmentId = row.equipmentId || this.ids
|
||||
getEquipment(equipmentId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改设备管理";
|
||||
});
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
// 查询明细按钮操作
|
||||
handleView(row){
|
||||
this.reset();
|
||||
const equipmentId = row.equipmentId || this.ids;
|
||||
getEquipment(equipmentId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "查看设备绑定信息";
|
||||
this.optType = "view";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.equipmentId != null) {
|
||||
updateEquipment(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addEquipment(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const equipmentIds = row.equipmentId || this.ids;
|
||||
this.$modal.confirm('是否确认删除设备管理编号为"' + equipmentIds + '"的数据项?').then(function() {
|
||||
return delEquipment(equipmentIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wms/equipment/export', {
|
||||
...this.queryParams
|
||||
}, `equipment_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,353 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="机台类型编码" prop="machineryCode" label-width="108px">
|
||||
<el-input
|
||||
v-model="queryParams.machineryCode"
|
||||
placeholder="请输入机台类型编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="机台类型名称" prop="machineryName" label-width="108px">
|
||||
<el-input
|
||||
v-model="queryParams.machineryName"
|
||||
placeholder="请输入机台类型名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['wms:machinery:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['wms:machinery:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['wms:machinery: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="['wms:machinery:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="machineryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- 序号 -->
|
||||
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
|
||||
<el-table-column label="机台编码" align="center" prop="machineryCode" />
|
||||
<el-table-column label="机台名称" align="center" prop="machineryName" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column prop="status" label="是否启用" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status == 1 ? "是" : "否" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['wms:machinery:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wms:machinery:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改机台管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="机台编码" prop="machineryCode">
|
||||
<el-input v-model="form.machineryCode" placeholder="请输入机台类型编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="机台名称" prop="machineryName">
|
||||
<el-input v-model="form.machineryName" placeholder="请输入机台类型名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌" prop="machineryBrand">
|
||||
<el-input v-model="form.machineryBrand" placeholder="请输入品牌" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="machinerySpec">
|
||||
<el-input v-model="form.machinerySpec" placeholder="请输入规格型号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="机台类型ID" prop="machineryTypeId">
|
||||
<el-input v-model="form.machineryTypeId" placeholder="请输入机台类型ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="机台类型编码" prop="machineryTypeCode">
|
||||
<el-input v-model="form.machineryTypeCode" placeholder="请输入机台类型编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="机台类型名称" prop="machineryTypeName">
|
||||
<el-input v-model="form.machineryTypeName" placeholder="请输入机台类型名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属线体ID" prop="workshopId">
|
||||
<el-input v-model="form.workshopId" placeholder="请输入所属车间ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属线体编码" prop="workshopCode">
|
||||
<el-input v-model="form.workshopCode" placeholder="请输入所属车间编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="机台产能" prop="">
|
||||
<el-input v-model="form.workshopCode" placeholder="" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属车间名称" prop="workshopName">
|
||||
<el-input v-model="form.workshopName" placeholder="请输入所属车间名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="status">
|
||||
<el-select v-model="form.status" placeholder="请选择是否启用" @change="$forceUpdate()" clearable>
|
||||
<el-option v-for="item in options" :key="item.status" :label="item.label" :value="item.status"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMachinery, getMachinery, delMachinery, addMachinery, updateMachinery } from "@/api/wms/machinery";
|
||||
|
||||
export default {
|
||||
name: "Machinery",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 机台管理表格数据
|
||||
machineryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
machineryCode: null,
|
||||
machineryName: null,
|
||||
machineryBrand: null,
|
||||
machinerySpec: null,
|
||||
machineryTypeId: null,
|
||||
machineryTypeCode: null,
|
||||
machineryTypeName: null,
|
||||
workshopId: null,
|
||||
workshopCode: null,
|
||||
workshopName: null,
|
||||
status: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
},
|
||||
options: [{
|
||||
status: "1",
|
||||
label: '是'
|
||||
}, {
|
||||
status: "0",
|
||||
label: '否'
|
||||
}],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
machineryCode: [
|
||||
{ required: true, message: "机台类型编码不能为空", trigger: "blur" }
|
||||
],
|
||||
machineryName: [
|
||||
{ required: true, message: "机台类型名称不能为空", trigger: "blur" }
|
||||
],
|
||||
machineryTypeId: [
|
||||
{ required: true, message: "机台类型ID不能为空", trigger: "blur" }
|
||||
],
|
||||
workshopId: [
|
||||
{ required: true, message: "所属车间ID不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "机台状态不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询机台管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listMachinery(this.queryParams).then(response => {
|
||||
this.machineryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
machineryId: null,
|
||||
machineryCode: null,
|
||||
machineryName: null,
|
||||
machineryBrand: null,
|
||||
machinerySpec: null,
|
||||
machineryTypeId: null,
|
||||
machineryTypeCode: null,
|
||||
machineryTypeName: null,
|
||||
workshopId: null,
|
||||
workshopCode: null,
|
||||
workshopName: null,
|
||||
status: null,
|
||||
remark: null,
|
||||
attr1: null,
|
||||
attr2: null,
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.machineryId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加机台管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const machineryId = row.machineryId || this.ids
|
||||
getMachinery(machineryId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改机台管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.machineryId != null) {
|
||||
updateMachinery(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addMachinery(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const machineryIds = row.machineryId || this.ids;
|
||||
this.$modal.confirm('是否确认删除机台管理编号为"' + machineryIds + '"的数据项?').then(function() {
|
||||
return delMachinery(machineryIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wms/machinery/export', {
|
||||
...this.queryParams
|
||||
}, `machinery_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,511 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="物料编码" prop="productCode">
|
||||
<el-input
|
||||
v-model="queryParams.productCode"
|
||||
placeholder="请输入物料编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="productDescZh">
|
||||
<el-input
|
||||
v-model="queryParams.productDescZh"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['wms:product:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['wms:product:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['wms:product: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="['wms:product:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="productList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键ID" align="center" prop="productId" /> -->
|
||||
<el-table-column label="物料编码" align="center" prop="productCode" />
|
||||
<el-table-column label="物料类别" align="center" prop="productGroup">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.productGroup == "material_type1" ? "物料类别1" : "物料类别2" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 中文描述也就是物料名称 -->
|
||||
<el-table-column label="物料名称" align="center" prop="productDescZh" />
|
||||
<el-table-column label="物料型号" align="center" prop="productModel" />
|
||||
<!-- <el-table-column label="英文描述" align="center" prop="productDescEn" />
|
||||
<el-table-column label="序列号规则代码" align="center" prop="ruleCode" />
|
||||
<el-table-column label="旧物料号" align="center" prop="oldProductCode" />
|
||||
<el-table-column label="散件物料号" align="center" prop="partsProductCode" />
|
||||
<el-table-column label="69码" align="center" prop="skuBarcode" />
|
||||
<el-table-column label="长" align="center" prop="length" />
|
||||
<el-table-column label="宽" align="center" prop="width" />
|
||||
<el-table-column label="高" align="center" prop="height" /> -->
|
||||
<!-- <el-table-column label="毛重" align="center" prop="grossWeight" />
|
||||
<el-table-column label="净重" align="center" prop="netWeight" />
|
||||
<el-table-column label="皮重" align="center" prop="tareWeight" />
|
||||
<el-table-column label="体积" align="center" prop="volume" />
|
||||
<el-table-column label="单价" align="center" prop="unitPrice" />
|
||||
<el-table-column label="产品组" align="center" prop="productGroup" />
|
||||
<el-table-column label="${comment}" align="center" prop="productGroupName" />
|
||||
<el-table-column label="用户自定义1" align="center" prop="userDefined1" />
|
||||
<el-table-column label="用户自定义2" align="center" prop="userDefined2" />
|
||||
<el-table-column label="用户自定义3" align="center" prop="userDefined3" />
|
||||
<el-table-column label="${comment}" align="center" prop="userDefined4" />
|
||||
<el-table-column label="${comment}" align="center" prop="userDefined5" />
|
||||
<el-table-column label="${comment}" align="center" prop="userDefined6" />
|
||||
<el-table-column label="工厂编码" align="center" prop="factoryCode" /> -->
|
||||
<el-table-column label="是否启用" align="center" prop="activeFlag">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.activeFlag == 1 ? "是" : "否" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="${comment}" align="center" prop="syncFlag" />
|
||||
<el-table-column label="${comment}" align="center" prop="primaryUom" />
|
||||
<el-table-column label="订单单位" align="center" prop="bstme" />
|
||||
<el-table-column label="${comment}" align="center" prop="basicOrder" />
|
||||
<el-table-column label="${comment}" align="center" prop="convOrder" />
|
||||
<el-table-column label="发货单位" align="center" prop="ausme" />
|
||||
<el-table-column label="${comment}" align="center" prop="basicIssue" />
|
||||
<el-table-column label="${comment}" align="center" prop="convIssue" />
|
||||
<el-table-column label="是否补料" align="center" prop="appendFlag" />
|
||||
<el-table-column label="补料比例" align="center" prop="appendPercent" /> -->
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['wms:product:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wms:product:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改物料信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="物料编码" prop="productCode">
|
||||
<el-input v-model="form.productCode" placeholder="请输入产品代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="productDescZh">
|
||||
<el-input v-model="form.productDescZh" placeholder="请输入物料名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料型号" prop="productModel">
|
||||
<el-input v-model="form.productModel" placeholder="请输入物料名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料类别" prop="productGroup">
|
||||
<el-select v-model="form.productGroup" placeholder="请选择物料类别">
|
||||
<el-option
|
||||
v-for="dict in dict.type.material_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="英文描述" prop="productDescEn">
|
||||
<el-input v-model="form.productDescEn" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="序列号规则代码" prop="ruleCode">
|
||||
<el-input v-model="form.ruleCode" placeholder="请输入序列号规则代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="旧物料号" prop="oldProductCode">
|
||||
<el-input v-model="form.oldProductCode" placeholder="请输入旧物料号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="散件物料号" prop="partsProductCode">
|
||||
<el-input v-model="form.partsProductCode" placeholder="请输入散件物料号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="69码" prop="skuBarcode">
|
||||
<el-input v-model="form.skuBarcode" placeholder="请输入69码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="长" prop="length">
|
||||
<el-input v-model="form.length" placeholder="请输入长" />
|
||||
</el-form-item>
|
||||
<el-form-item label="宽" prop="width">
|
||||
<el-input v-model="form.width" placeholder="请输入宽" />
|
||||
</el-form-item>
|
||||
<el-form-item label="高" prop="height">
|
||||
<el-input v-model="form.height" placeholder="请输入高" />
|
||||
</el-form-item>
|
||||
<el-form-item label="毛重" prop="grossWeight">
|
||||
<el-input v-model="form.grossWeight" placeholder="请输入毛重" />
|
||||
</el-form-item>
|
||||
<el-form-item label="净重" prop="netWeight">
|
||||
<el-input v-model="form.netWeight" placeholder="请输入净重" />
|
||||
</el-form-item>
|
||||
<el-form-item label="皮重" prop="tareWeight">
|
||||
<el-input v-model="form.tareWeight" placeholder="请输入皮重" />
|
||||
</el-form-item>
|
||||
<el-form-item label="体积" prop="volume">
|
||||
<el-input v-model="form.volume" placeholder="请输入体积" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单价" prop="unitPrice">
|
||||
<el-input v-model="form.unitPrice" placeholder="请输入单价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品组" prop="productGroup">
|
||||
<el-input v-model="form.productGroup" placeholder="请输入产品组" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="productGroupName">
|
||||
<el-input v-model="form.productGroupName" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户自定义1" prop="userDefined1">
|
||||
<el-input v-model="form.userDefined1" placeholder="请输入用户自定义1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户自定义2" prop="userDefined2">
|
||||
<el-input v-model="form.userDefined2" placeholder="请输入用户自定义2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户自定义3" prop="userDefined3">
|
||||
<el-input v-model="form.userDefined3" placeholder="请输入用户自定义3" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="userDefined4">
|
||||
<el-input v-model="form.userDefined4" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="userDefined5">
|
||||
<el-input v-model="form.userDefined5" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="userDefined6">
|
||||
<el-input v-model="form.userDefined6" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂编码" prop="factoryCode">
|
||||
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="是否启用" prop="activeFlag">
|
||||
<el-select v-model="form.activeFlag" placeholder="请选择是否启用" @change="$forceUpdate()" clearable>
|
||||
<el-option v-for="item in options" :key="item.activeFlag" :label="item.label" :value="item.activeFlag"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="${comment}" prop="syncFlag">
|
||||
<el-input v-model="form.syncFlag" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="primaryUom">
|
||||
<el-input v-model="form.primaryUom" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="delFlag">
|
||||
<el-input v-model="form.delFlag" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单单位" prop="bstme">
|
||||
<el-input v-model="form.bstme" placeholder="请输入订单单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="basicOrder">
|
||||
<el-input v-model="form.basicOrder" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="convOrder">
|
||||
<el-input v-model="form.convOrder" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发货单位" prop="ausme">
|
||||
<el-input v-model="form.ausme" placeholder="请输入发货单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="basicIssue">
|
||||
<el-input v-model="form.basicIssue" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="${comment}" prop="convIssue">
|
||||
<el-input v-model="form.convIssue" placeholder="请输入${comment}" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否补料" prop="appendFlag">
|
||||
<el-input v-model="form.appendFlag" placeholder="请输入是否补料" />
|
||||
</el-form-item>
|
||||
<el-form-item label="补料比例" prop="appendPercent">
|
||||
<el-input v-model="form.appendPercent" placeholder="请输入补料比例" />
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listProduct, getProduct, delProduct, addProduct, updateProduct } from "@/api/wms/product";
|
||||
|
||||
export default {
|
||||
name: "Product",
|
||||
dicts: ['sys_normal_disable', 'material_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 物料信息表格数据
|
||||
productList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
productCode: null,
|
||||
productDescZh: null,
|
||||
productModel:null,
|
||||
productDescEn: null,
|
||||
ruleCode: null,
|
||||
oldProductCode: null,
|
||||
partsProductCode: null,
|
||||
skuBarcode: null,
|
||||
length: null,
|
||||
width: null,
|
||||
height: null,
|
||||
grossWeight: null,
|
||||
netWeight: null,
|
||||
tareWeight: null,
|
||||
volume: null,
|
||||
unitPrice: null,
|
||||
productGroup: null,
|
||||
productGroupName: null,
|
||||
userDefined1: null,
|
||||
userDefined2: null,
|
||||
userDefined3: null,
|
||||
userDefined4: null,
|
||||
userDefined5: null,
|
||||
userDefined6: null,
|
||||
factoryCode: null,
|
||||
activeFlag: null,
|
||||
syncFlag: null,
|
||||
primaryUom: null,
|
||||
bstme: null,
|
||||
basicOrder: null,
|
||||
convOrder: null,
|
||||
ausme: null,
|
||||
basicIssue: null,
|
||||
convIssue: null,
|
||||
appendFlag: null,
|
||||
appendPercent: null
|
||||
},
|
||||
options: [{
|
||||
activeFlag: "1",
|
||||
label: '是'
|
||||
}, {
|
||||
activeFlag: "0",
|
||||
label: '否'
|
||||
}],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
productCode: [
|
||||
{ required: true, message: "产品代码不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 生成表头序号
|
||||
indexMethod(index) {
|
||||
return index + 1;
|
||||
},
|
||||
/** 查询物料信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProduct(this.queryParams).then(response => {
|
||||
this.productList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
productId: null,
|
||||
productCode: null,
|
||||
productDescZh: null,
|
||||
productModel:null,
|
||||
productDescEn: null,
|
||||
ruleCode: null,
|
||||
oldProductCode: null,
|
||||
partsProductCode: null,
|
||||
skuBarcode: null,
|
||||
length: null,
|
||||
width: null,
|
||||
height: null,
|
||||
grossWeight: null,
|
||||
netWeight: null,
|
||||
tareWeight: null,
|
||||
volume: null,
|
||||
unitPrice: null,
|
||||
productGroup: null,
|
||||
productGroupName: null,
|
||||
userDefined1: null,
|
||||
userDefined2: null,
|
||||
userDefined3: null,
|
||||
userDefined4: null,
|
||||
userDefined5: null,
|
||||
userDefined6: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
factoryCode: null,
|
||||
activeFlag: null,
|
||||
syncFlag: null,
|
||||
primaryUom: null,
|
||||
delFlag: null,
|
||||
bstme: null,
|
||||
basicOrder: null,
|
||||
convOrder: null,
|
||||
ausme: null,
|
||||
basicIssue: null,
|
||||
convIssue: null,
|
||||
appendFlag: null,
|
||||
appendPercent: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.productId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加物料信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const productId = row.productId || this.ids
|
||||
getProduct(productId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改物料信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.productId != null) {
|
||||
updateProduct(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProduct(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const productIds = row.productId || this.ids;
|
||||
this.$modal.confirm('是否确认删除物料信息编号为"' + productIds + '"的数据项?').then(function() {
|
||||
return delProduct(productIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wms/product/export', {
|
||||
...this.queryParams
|
||||
}, `product_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,336 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
|
||||
<el-form-item label="物料类别编码" prop="pgCode">
|
||||
<el-input
|
||||
v-model="queryParams.pgCode"
|
||||
placeholder="请输入物料类别编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['wms:productGroups:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['wms:productGroups:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['wms:productGroups: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="['wms:productGroups:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="productGroupsList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- 序号 -->
|
||||
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
|
||||
<el-table-column label="物料类别编码" align="center" prop="pgCode" />
|
||||
<el-table-column label="物料类别名称" align="center" prop="pgDescGlobal">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.pgDescGlobal == "material_type1" ? "物料类别1" : "物料类别2" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="可用标识" align="center" prop="Active">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.Active == 1 ? "是" : "否" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="企业主键" align="center" prop="enterpriseId" />
|
||||
<el-table-column label="企业编码" align="center" prop="enterpriseCode" />
|
||||
<el-table-column label="工厂主键" align="center" prop="siteId" />
|
||||
<el-table-column label="工厂编码" align="center" prop="siteCode" /> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['wms:productGroups:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wms:productGroups:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改物料分组对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-form-item label="物料类别编码" prop="pgCode">
|
||||
<el-input v-model="form.pgCode" placeholder="请输入物料类别编码" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="产品分组简称" prop="pgDesc">
|
||||
<el-input v-model="form.pgDesc" placeholder="请输入产品分组简称" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="物料类别名称" prop="pgDescGlobal">
|
||||
<el-select v-model="form.pgDescGlobal" placeholder="请选择物料类别名称">
|
||||
<el-option
|
||||
v-for="dict in dict.type.material_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="产品分组扩展名称" prop="pgDescExtended">
|
||||
<el-input v-model="form.pgDescExtended" placeholder="请输入产品分组扩展名称" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="可用标识" prop="Active">
|
||||
<el-select v-model="form.Active" placeholder="请选择是否启用" @change="$forceUpdate()" clearable>
|
||||
<el-option v-for="item in options" :key="item.Active" :label="item.label" :value="item.Active"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="企业主键" prop="enterpriseId">
|
||||
<el-input v-model="form.enterpriseId" placeholder="请输入企业主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="企业编码" prop="enterpriseCode">
|
||||
<el-input v-model="form.enterpriseCode" placeholder="请输入企业编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂主键" prop="siteId">
|
||||
<el-input v-model="form.siteId" placeholder="请输入工厂主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂编码" prop="siteCode">
|
||||
<el-input v-model="form.siteCode" placeholder="请输入工厂编码" />
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listProductGroups, getProductGroups, delProductGroups, addProductGroups, updateProductGroups } from "@/api/wms/productGroups";
|
||||
|
||||
export default {
|
||||
name: "ProductGroups",
|
||||
dicts: ['sys_normal_disable', 'material_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 物料分组表格数据
|
||||
productGroupsList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pgCode: null,
|
||||
pgDesc: null,
|
||||
pgDescGlobal: null,
|
||||
pgDescExtended: null,
|
||||
Active: null,
|
||||
enterpriseId: null,
|
||||
enterpriseCode: null,
|
||||
siteId: null,
|
||||
siteCode: null
|
||||
},
|
||||
options: [{
|
||||
Active: "1",
|
||||
label: '是'
|
||||
}, {
|
||||
Active: "0",
|
||||
label: '否'
|
||||
}],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
pgDesc: [
|
||||
{ required: true, message: "产品分组简称不能为空", trigger: "blur" }
|
||||
],
|
||||
pgDescGlobal: [
|
||||
{ required: true, message: "产品分组通用名称不能为空", trigger: "blur" }
|
||||
],
|
||||
pgDescExtended: [
|
||||
{ required: true, message: "产品分组扩展名称不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 生成表头序号
|
||||
indexMethod(index) {
|
||||
return index + 1;
|
||||
},
|
||||
/** 查询物料分组列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProductGroups(this.queryParams).then(response => {
|
||||
this.productGroupsList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
pgId: null,
|
||||
pgCode: null,
|
||||
pgDesc: null,
|
||||
pgDescGlobal: null,
|
||||
pgDescExtended: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
Active: null,
|
||||
enterpriseId: null,
|
||||
enterpriseCode: null,
|
||||
siteId: null,
|
||||
siteCode: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.pgId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加物料分组";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const pgId = row.pgId || this.ids
|
||||
getProductGroups(pgId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改物料分组";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.pgId != null) {
|
||||
updateProductGroups(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProductGroups(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const pgIds = row.pgId || this.ids;
|
||||
this.$modal.confirm('是否确认删除物料分组编号为"' + pgIds + '"的数据项?').then(function() {
|
||||
return delProductGroups(pgIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wms/productGroups/export', {
|
||||
...this.queryParams
|
||||
}, `productGroups_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,584 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px">
|
||||
<el-form-item label="供应商代码" prop="supplierCode">
|
||||
<el-input
|
||||
v-model="queryParams.supplierCode"
|
||||
placeholder="请输入供应商代码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商名称" prop="zhDesc">
|
||||
<el-input
|
||||
v-model="queryParams.zhDesc"
|
||||
placeholder="请输入供应商名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="英文描述" prop="enDesc">
|
||||
<el-input
|
||||
v-model="queryParams.enDesc"
|
||||
placeholder="请输入英文描述"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="账号" prop="accountNumber">
|
||||
<el-input
|
||||
v-model="queryParams.accountNumber"
|
||||
placeholder="请输入账号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="证照编码" prop="licenceNumber">
|
||||
<el-input
|
||||
v-model="queryParams.licenceNumber"
|
||||
placeholder="请输入证照编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="省" prop="province">
|
||||
<el-input
|
||||
v-model="queryParams.province"
|
||||
placeholder="请输入省"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="市" prop="city">
|
||||
<el-input
|
||||
v-model="queryParams.city"
|
||||
placeholder="请输入市"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区" prop="area">
|
||||
<el-input
|
||||
v-model="queryParams.area"
|
||||
placeholder="请输入区"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮编" prop="postcode">
|
||||
<el-input
|
||||
v-model="queryParams.postcode"
|
||||
placeholder="请输入邮编"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="联系人" prop="contact">
|
||||
<el-input
|
||||
v-model="queryParams.contact"
|
||||
placeholder="请输入联系人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="联系人电话" prop="contactPhone">
|
||||
<el-input
|
||||
v-model="queryParams.contactPhone"
|
||||
placeholder="请输入联系人电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人职务" prop="contactPosition">
|
||||
<el-input
|
||||
v-model="queryParams.contactPosition"
|
||||
placeholder="请输入联系人职务"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人电子邮件" prop="contactEmail">
|
||||
<el-input
|
||||
v-model="queryParams.contactEmail"
|
||||
placeholder="请输入联系人电子邮件"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="激活标记" prop="activeFlag">
|
||||
<el-input
|
||||
v-model="queryParams.activeFlag"
|
||||
placeholder="请输入激活标记"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户自定义1--国家" prop="userDefined1">
|
||||
<el-input
|
||||
v-model="queryParams.userDefined1"
|
||||
placeholder="请输入用户自定义1--国家"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户自定义2--税号" prop="userDefined2">
|
||||
<el-input
|
||||
v-model="queryParams.userDefined2"
|
||||
placeholder="请输入用户自定义2--税号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户自定义3" prop="userDefined3">
|
||||
<el-input
|
||||
v-model="queryParams.userDefined3"
|
||||
placeholder="请输入用户自定义3"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['wms:supplier:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['wms:supplier:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['wms:supplier: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="['wms:supplier:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="supplierList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键uuid" align="center" prop="supplierId" /> -->
|
||||
<!-- 序号 -->
|
||||
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
|
||||
<el-table-column label="供应商代码" align="center" prop="supplierCode" width="100"/>
|
||||
<el-table-column label="供应商名字" align="center" prop="zhDesc" width="100"/>
|
||||
<el-table-column label="英文描述" align="center" prop="enDesc" />
|
||||
<el-table-column label="供应商类型" align="center" prop="supplierType" width="100"/>
|
||||
<el-table-column label="账号" align="center" prop="accountNumber" />
|
||||
<el-table-column label="证照编码" align="center" prop="licenceNumber" />
|
||||
<el-table-column label="经营范围" align="center" prop="businessScope" />
|
||||
<el-table-column label="省" align="center" prop="province" />
|
||||
<el-table-column label="市" align="center" prop="city" />
|
||||
<el-table-column label="区" align="center" prop="area" />
|
||||
<el-table-column label="详细地址" align="center" prop="address" />
|
||||
<el-table-column label="邮编" align="center" prop="postcode" />
|
||||
<el-table-column label="联系人" align="center" prop="contact" />
|
||||
<el-table-column label="联系人电话" align="center" prop="contactPhone" width="100"/>
|
||||
<el-table-column label="联系人职务" align="center" prop="contactPosition" width="100"/>
|
||||
<el-table-column label="联系人电子邮件" align="center" prop="contactEmail" width="120"/>
|
||||
<el-table-column label="激活标记" align="center" prop="activeFlag">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.activeFlag == 1 ? "是" : "否" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="国家" align="center" prop="userDefined1" />
|
||||
<el-table-column label="税号" align="center" prop="userDefined2" />
|
||||
<!-- <el-table-column label="用户自定义3" align="center" prop="userDefined3" />
|
||||
<el-table-column label="备注" align="center" prop="remark" /> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['wms:supplier:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wms:supplier:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改供应商管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商代码" prop="supplierCode">
|
||||
<el-input v-model="form.supplierCode" placeholder="请输入供应商代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商名字" prop="zhDesc">
|
||||
<el-input v-model="form.zhDesc" placeholder="请输入供应商名字" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="英文描述" prop="enDesc">
|
||||
<el-input v-model="form.enDesc" placeholder="请输入供应商代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商类型" prop="supplierType">
|
||||
<el-input v-model="form.supplierType" placeholder="请输入供应商名字" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="账号" prop="accountNumber">
|
||||
<el-input v-model="form.accountNumber" placeholder="请输入账号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="证照编码" prop="licenceNumber">
|
||||
<el-input v-model="form.licenceNumber" placeholder="请输入证照编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="国家" prop="userDefined1">
|
||||
<el-input v-model="form.userDefined1" placeholder="请输入国家" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="省" prop="province">
|
||||
<el-input v-model="form.province" placeholder="请输入省" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="市" prop="city">
|
||||
<el-input v-model="form.city" placeholder="请输入市" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="区" prop="area">
|
||||
<el-input v-model="form.area" placeholder="请输入区" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="详细地址" prop="address">
|
||||
<el-input v-model="form.address" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮编" prop="postcode">
|
||||
<el-input v-model="form.postcode" placeholder="请输入邮编" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人" prop="contact">
|
||||
<el-input v-model="form.contact" placeholder="请输入联系人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人电话" prop="contactPhone">
|
||||
<el-input v-model="form.contactPhone" placeholder="请输入联系人电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人职务" prop="contactPosition">
|
||||
<el-input v-model="form.contactPosition" placeholder="请输入联系人职务" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人电子邮件" prop="contactEmail">
|
||||
<el-input v-model="form.contactEmail" placeholder="请输入联系人电子邮件" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否启用" prop="activeFlag">
|
||||
<el-select v-model="form.activeFlag" placeholder="请选择是否启用" @change="$forceUpdate()" clearable>
|
||||
<el-option v-for="item in options" :key="item.activeFlag" :label="item.label" :value="item.activeFlag"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="经营范围" prop="businessScope">
|
||||
<el-input v-model="form.businessScope" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="税号" prop="userDefined2">
|
||||
<el-input v-model="form.userDefined2" placeholder="请输入税号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-form-item label="用户自定义3" prop="userDefined3">
|
||||
<el-input v-model="form.userDefined3" placeholder="请输入用户自定义3" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSupplier, getSupplier, delSupplier, addSupplier, updateSupplier } from "@/api/wms/supplier";
|
||||
|
||||
export default {
|
||||
name: "Supplier",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 供应商管理表格数据
|
||||
supplierList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
supplierCode: null,
|
||||
zhDesc: null,
|
||||
enDesc: null,
|
||||
supplierType: null,
|
||||
accountNumber: null,
|
||||
licenceNumber: null,
|
||||
businessScope: null,
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
address: null,
|
||||
postcode: null,
|
||||
contact: null,
|
||||
contactPhone: null,
|
||||
contactPosition: null,
|
||||
contactEmail: null,
|
||||
activeFlag: null,
|
||||
userDefined1: null,
|
||||
userDefined2: null,
|
||||
userDefined3: null,
|
||||
},
|
||||
options: [{
|
||||
activeFlag: "1",
|
||||
label: '是'
|
||||
}, {
|
||||
activeFlag: "0",
|
||||
label: '否'
|
||||
}],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
supplierCode: [
|
||||
{ required: true, message: "供应商代码不能为空", trigger: "blur" }
|
||||
],
|
||||
zhDesc: [
|
||||
{ required: true, message: "供应商名字不能为空", trigger: "blur" }
|
||||
],
|
||||
activeFlag: [
|
||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 生成表头序号
|
||||
indexMethod(index) {
|
||||
return index + 1;
|
||||
},
|
||||
/** 查询供应商管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSupplier(this.queryParams).then(response => {
|
||||
this.supplierList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
supplierId: null,
|
||||
supplierCode: null,
|
||||
zhDesc: null,
|
||||
enDesc: null,
|
||||
supplierType: null,
|
||||
accountNumber: null,
|
||||
licenceNumber: null,
|
||||
businessScope: null,
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
address: null,
|
||||
postcode: null,
|
||||
contact: null,
|
||||
contactPhone: null,
|
||||
contactPosition: null,
|
||||
contactEmail: null,
|
||||
activeFlag: null,
|
||||
userDefined1: null,
|
||||
userDefined2: null,
|
||||
userDefined3: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.supplierId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加供应商管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const supplierId = row.supplierId || this.ids
|
||||
getSupplier(supplierId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改供应商管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.supplierId != null) {
|
||||
updateSupplier(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSupplier(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const supplierIds = row.supplierId || this.ids;
|
||||
this.$modal.confirm('是否确认删除供应商管理编号为"' + supplierIds + '"的数据项?').then(function() {
|
||||
return delSupplier(supplierIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wms/supplier/export', {
|
||||
...this.queryParams
|
||||
}, `supplier_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue