parent
9df4e92923
commit
7ef9e16de0
@ -0,0 +1,285 @@
|
||||
<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="categoryName">
|
||||
<el-input
|
||||
v-model="queryParams.categoryName"
|
||||
placeholder="请输入仓库类别名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="虚拟标识" prop="virtualFlag">
|
||||
<el-select
|
||||
v-model="queryParams.virtualFlag"
|
||||
placeholder="请选择虚拟标识"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.wms_category_virtual_flag"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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:wmscategory: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:wmscategory: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:wmscategory:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="wmscategoryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="仓库类别ID" align="center" prop="categoryId" />
|
||||
<el-table-column label="仓库类别名称" align="center" prop="categoryName" />
|
||||
<el-table-column label="虚拟标识" align="center" prop="virtualFlag" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_category_virtual_flag" :value="scope.row.virtualFlag"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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:wmscategory:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wms:wmscategory: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="120px">
|
||||
<el-form-item label="仓库类别名称" prop="categoryName">
|
||||
<el-input v-model="form.categoryName" placeholder="请输入仓库类别名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="虚拟标识" prop="virtualFlag">
|
||||
<el-radio-group v-model="form.virtualFlag">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.wms_category_virtual_flag"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" 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 { listWmscategory, getWmscategory, delWmscategory, addWmscategory, updateWmscategory } from "@/api/wms/wmscategory";
|
||||
|
||||
export default {
|
||||
name: "Wmscategory",
|
||||
dicts: ['wms_category_virtual_flag'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 仓库类别表格数据
|
||||
wmscategoryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
categoryName: null,
|
||||
virtualFlag: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
categoryName: [
|
||||
{ required: true, message: "仓库类别名称不能为空", trigger: "blur" }
|
||||
],
|
||||
virtualFlag: [
|
||||
{ required: true, message: "虚拟标识(0否,1是)不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询仓库类别列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWmscategory(this.queryParams).then(response => {
|
||||
this.wmscategoryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
categoryId: null,
|
||||
categoryName: null,
|
||||
virtualFlag: null,
|
||||
remark: 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.categoryId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加仓库类别";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const categoryId = row.categoryId || this.ids
|
||||
getWmscategory(categoryId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改仓库类别";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.categoryId != null) {
|
||||
updateWmscategory(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addWmscategory(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const categoryIds = row.categoryId || this.ids;
|
||||
this.$modal.confirm('是否确认删除仓库类别ID为"' + categoryIds + '"的数据项?').then(function() {
|
||||
return delWmscategory(categoryIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wms/wmscategory/export', {
|
||||
...this.queryParams
|
||||
}, `wmscategory_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,260 @@
|
||||
<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="taskCode">
|
||||
<el-input
|
||||
v-model="queryParams.taskCode"
|
||||
placeholder="请输入任务编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="warehouseId">
|
||||
<el-select v-model="queryParams.warehouseId" placeholder="请选择仓库" clearable>
|
||||
<el-option
|
||||
v-for="(category, index) in warehouseOptions"
|
||||
:key="index"
|
||||
:label="category.warehouseName"
|
||||
:value="category.warehouseId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="库位编码" prop="locationCode">
|
||||
<el-input
|
||||
v-model="queryParams.locationCode"
|
||||
placeholder="请输入库位编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购订单" prop="poNo">
|
||||
<el-input
|
||||
v-model="queryParams.poNo"
|
||||
placeholder="请输入采购订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="materialCode">
|
||||
<el-input
|
||||
v-model="queryParams.materialCode"
|
||||
placeholder="请输入物料编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="materialName">
|
||||
<el-input
|
||||
v-model="queryParams.materialName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料条码" prop="materialBarcode">
|
||||
<el-input
|
||||
v-model="queryParams.materialBarcode"
|
||||
placeholder="请输入物料条码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘编码" prop="palletInfoCode">
|
||||
<el-input
|
||||
v-model="queryParams.palletInfoCode"
|
||||
placeholder="请输入托盘编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库人" prop="applyBy">
|
||||
<el-input
|
||||
v-model="queryParams.applyBy"
|
||||
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">
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="rawinstockList">
|
||||
<el-table-column label="任务编号" align="center" prop="taskCode" />
|
||||
<el-table-column label="仓库" align="center" prop="warehouseId" >
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
v-for="(item, index) in warehouseOptions"
|
||||
:key="index"
|
||||
:value="item.warehouseOptions"
|
||||
v-if="scope.row.warehouseId == item.warehouseId"
|
||||
>
|
||||
{{ item.warehouseName }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库位编码" align="center" prop="locationCode" />
|
||||
<el-table-column label="采购订单号" align="center" prop="poNo" />
|
||||
<el-table-column label="操作类型" align="center" prop="operationType" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_operation_type" :value="scope.row.operationType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库类型" align="center" prop="instockType" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_instock_type" :value="scope.row.instockType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编码" align="center" prop="materialCode" />
|
||||
<el-table-column label="物料名称" align="center" prop="materialName" />
|
||||
<el-table-column label="物料条码" align="center" prop="materialBarcode" />
|
||||
<el-table-column label="批次条码" align="center" prop="materialBatchCode" />
|
||||
<el-table-column label="托盘编码" align="center" prop="palletInfoCode" />
|
||||
<el-table-column label="入库数量" align="center" prop="instockAmount" />
|
||||
<el-table-column label="执行状态" align="center" prop="executeStatus" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_execute_status" :value="scope.row.executeStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="同步ERP状态" align="center" prop="erpStatus" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_erp_status" :value="scope.row.erpStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="同步ERP数量" align="center" prop="erpAmount" />
|
||||
<el-table-column label="入库人" align="center" prop="applyBy" />
|
||||
<el-table-column label="入库时间" align="center" prop="applyDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.applyDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--el-table-column label="质检状态(0:待质检,1:合格,2:NG)" align="center" prop="qualityStatus" /-->
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRawinstock, getRawWarehouses } from "@/api/wms/rawinstock";
|
||||
|
||||
export default {
|
||||
name: "Rawinstock",
|
||||
dicts: ["wms_operation_type","wms_instock_type","wms_execute_status","wms_erp_status"],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 原材料入库记录表格数据
|
||||
rawinstockList: [],
|
||||
// 仓库类别
|
||||
warehouseOptions: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
taskCode: null,
|
||||
warehouseId: null,
|
||||
locationCode: null,
|
||||
poNo: null,
|
||||
operationType: null,
|
||||
instockType: null,
|
||||
materialCode: null,
|
||||
materialName: null,
|
||||
materialBarcode: null,
|
||||
materialBatchCode: null,
|
||||
palletInfoCode: null,
|
||||
instockAmount: null,
|
||||
executeStatus: null,
|
||||
erpStatus: null,
|
||||
erpAmount: null,
|
||||
applyBy: null,
|
||||
applyDate: null,
|
||||
machineName: null,
|
||||
qualityStatus: null,
|
||||
updateDate: null,
|
||||
beginTime: null,
|
||||
endTime: null,
|
||||
rawReturnId: null
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getRawWarehouses();
|
||||
},
|
||||
methods: {
|
||||
/** 查询原材料入库记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRawinstock(this.queryParams).then(response => {
|
||||
this.rawinstockList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.rawInstockId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wms/rawinstock/export', {
|
||||
...this.queryParams
|
||||
}, `rawinstock_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
|
||||
/** 查询仓库类别 */
|
||||
getRawWarehouses() {
|
||||
getRawWarehouses().then(response => {
|
||||
this.warehouseOptions = response.data;
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue