完成库存批次台账列表功能
This commit is contained in:
parent
49e6add53b
commit
6053df2144
61
src/api/mes/md/inventoryBatch.js
Normal file
61
src/api/mes/md/inventoryBatch.js
Normal file
@ -0,0 +1,61 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询刀具台账列表
|
||||
export function listInventoryBatch(query) {
|
||||
return request({
|
||||
url: '/mes/md/inventoryBatch/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询刀具台账详细
|
||||
export function getBaseKnife(baseKnifeId) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife/' + baseKnifeId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增刀具台账
|
||||
export function addBaseKnife(data) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改刀具台账
|
||||
export function updateBaseKnife(data) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除刀具台账
|
||||
export function delBaseKnife(baseKnifeId) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife/' + baseKnifeId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 重置刀具台账寿命
|
||||
export function resetBaseKnife(baseKnifeId) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife/reset/' + baseKnifeId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 重置刀具台账寿命
|
||||
export function submitZdTask(data) {
|
||||
return request({
|
||||
url: '/mes/md/baseKnife/zdTask',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
@ -246,19 +246,20 @@
|
||||
<dict-tag :options="dict.type.plan_source_type" :value="scope.row.planType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领用人" align="center" prop="useUsername" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="出库类型编码" align="center" prop="planTypeCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="出库类型名称" align="center" prop="planTypeName" :show-overflow-tooltip="true"/>
|
||||
<!-- <el-table-column label="领用人" align="center" prop="useUsername" :show-overflow-tooltip="true"/>-->
|
||||
<!-- <el-table-column label="出库类型编码" align="center" prop="planTypeCode" :show-overflow-tooltip="true"/>-->
|
||||
<el-table-column label="出库类型" align="center" prop="planTypeName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="明细批次" align="center" prop="detailBatchNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="库位编码" align="center" prop="wmStorageAreaCode" :show-overflow-tooltip="true"/>
|
||||
<!-- <el-table-column label="库位编码" align="center" prop="wmStorageAreaCode" :show-overflow-tooltip="true"/>-->
|
||||
<el-table-column label="库位名称" align="center" prop="wmStorageAreaName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="明细状态" align="center" prop="detailStatus" :show-overflow-tooltip="true"/>
|
||||
<!-- <el-table-column label="明细状态" align="center" prop="detailStatus" :show-overflow-tooltip="true"/>-->
|
||||
<el-table-column label="出库时间" align="center" prop="outTime" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="是否对刀" align="center" prop="isToolSetting" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isToolSetting == 0 ? '否' : '是' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="对刀参数" align="center" prop="toolSettingParam" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
|
||||
<el-divider content-position="center">入库信息</el-divider>
|
||||
|
367
src/views/mes/md/inventoryBatch/index.vue
Normal file
367
src/views/mes/md/inventoryBatch/index.vue
Normal file
@ -0,0 +1,367 @@
|
||||
<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="batchNum">
|
||||
<el-input
|
||||
v-model="queryParams.batchNum"
|
||||
placeholder="请输入批次"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="mdItemCode">
|
||||
<el-input
|
||||
v-model="queryParams.mdItemCode"
|
||||
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="TASKList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.in_plan_state" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次" align="center" prop="batchNum"/>
|
||||
<el-table-column label="物料编码" align="center" prop="mdItemCode"/>
|
||||
<el-table-column label="物料名称" align="center" prop="mdItemName"/>
|
||||
<el-table-column label="物料单位" align="center" prop="mdItemUnit"/>
|
||||
<el-table-column label="物料数量" align="center" prop="mdItemNum"/>
|
||||
<el-table-column label="类型" align="center" prop="inOrOut">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.inOrOut == 0 ? '出库' : '入库' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出/入库时间" align="center" prop="dateTime"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleLook(scope.row)"
|
||||
v-hasPermi="['md:TASK:edit']"
|
||||
>查看物料清单
|
||||
</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 :close-on-click-modal="false" :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="出库计划ID" prop="wmsOutPlanId">
|
||||
<el-input v-model="form.wmsOutPlanId" placeholder="请输入出库计划ID"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库计划编码" prop="wmsOutPlanCode">
|
||||
<el-input v-model="form.wmsOutPlanCode" placeholder="请输入出库计划编码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库计划明细ID" prop="wmsOutPlanDetailId">
|
||||
<el-input v-model="form.wmsOutPlanDetailId" placeholder="请输入出库计划明细ID"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库类型ID" prop="wmsBusinessTypeId">
|
||||
<el-input v-model="form.wmsBusinessTypeId" placeholder="请输入出库类型ID"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务编码" prop="taskCode">
|
||||
<el-input v-model="form.taskCode" placeholder="请输入任务编码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务数量" prop="taskNumber">
|
||||
<el-input v-model="form.taskNumber" placeholder="请输入任务数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库数量" prop="outNumber">
|
||||
<el-input v-model="form.outNumber" placeholder="请输入出库数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="目标库位ID" prop="wmStorageAreaId">
|
||||
<el-input v-model="form.wmStorageAreaId" placeholder="请输入目标库位ID"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次" prop="batchNum">
|
||||
<el-input v-model="form.batchNum" placeholder="请输入批次"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料ID" prop="mdItemId">
|
||||
<el-input v-model="form.mdItemId" placeholder="请输入物料ID"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="mdItemCode">
|
||||
<el-input v-model="form.mdItemCode" placeholder="请输入物料编码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="mdItemName">
|
||||
<el-input v-model="form.mdItemName" placeholder="请输入物料名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料单位" prop="mdItemUnit">
|
||||
<el-input v-model="form.mdItemUnit" placeholder="请输入物料单位"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务状态" prop="taskState">
|
||||
<el-select v-model="form.taskState" placeholder="请选择任务状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.in_plan_state"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="领料人" prop="recipientUsername">
|
||||
<el-input v-model="form.recipientUsername" placeholder="请输入领料人"/>
|
||||
</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>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" title="出库物品清单" :visible.sync="openLook" width="60%" append-to-body>
|
||||
<el-table :data="outInfoList" >
|
||||
<el-table-column label="计划状态" align="center" prop="planStatus" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="计划类型" align="center" prop="planType" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="出库类型编码" align="center" prop="planTypeCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="出库类型名称" align="center" prop="planTypeName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="明细批次" align="center" prop="detailBatchNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="台账ID" align="center" prop="baseKnifeId" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="物料编码" align="center" prop="mdItemCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="物料名称" align="center" prop="mdItemName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="库位编码" align="center" prop="wmStorageAreaCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="库位名称" align="center" prop="wmStorageAreaName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="当时寿命%" align="center" prop="knifeLife" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="openLook = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listTASK, getTASK, delTASK, addTASK, updateTASK, runTASK, autoRunTASK} from "@/api/md/TASK";
|
||||
import {listInventoryBatch} from "@/api/mes/md/inventoryBatch"
|
||||
import {rgb} from "chalk";
|
||||
|
||||
export default {
|
||||
name: "TASK",
|
||||
dicts: ['in_plan_state'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 出库任务表格数据
|
||||
TASKList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
wmsOutPlanId: null,
|
||||
wmsOutPlanCode: null,
|
||||
wmsOutPlanDetailId: null,
|
||||
wmsBusinessTypeId: null,
|
||||
taskCode: null,
|
||||
taskNumber: null,
|
||||
outNumber: null,
|
||||
wmStorageAreaId: null,
|
||||
batchNum: null,
|
||||
mdItemId: null,
|
||||
mdItemCode: null,
|
||||
mdItemName: null,
|
||||
mdItemUnit: null,
|
||||
taskState: null,
|
||||
recipientUsername: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
openLook: false,
|
||||
outInfoList: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询出库任务列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listInventoryBatch(this.queryParams).then(response => {
|
||||
this.TASKList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
wmsOutTaskId: null,
|
||||
wmsOutPlanId: null,
|
||||
wmsOutPlanCode: null,
|
||||
wmsOutPlanDetailId: null,
|
||||
wmsBusinessTypeId: null,
|
||||
taskCode: null,
|
||||
taskNumber: null,
|
||||
outNumber: null,
|
||||
wmStorageAreaId: null,
|
||||
batchNum: null,
|
||||
mdItemId: null,
|
||||
mdItemCode: null,
|
||||
mdItemName: null,
|
||||
mdItemUnit: null,
|
||||
taskState: null,
|
||||
recipientUsername: 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.wmsOutTaskId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加出库任务";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const wmsOutTaskId = row.wmsOutTaskId || this.ids
|
||||
getTASK(wmsOutTaskId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改出库任务";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.wmsOutTaskId != null) {
|
||||
updateTASK(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addTASK(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 查看按钮操作 */
|
||||
handleLook(row) {
|
||||
const wmsOutTaskIds = row.wmsOutTaskId || this.ids;
|
||||
getTASK(wmsOutTaskIds).then(response => {
|
||||
this.openLook = true;
|
||||
this.outInfoList = []
|
||||
this.outInfoList = response.data.outInfoList;
|
||||
});
|
||||
},
|
||||
/** 执行按钮操作 */
|
||||
handleRun(row) {
|
||||
const wmsOutTaskIds = row.wmsOutTaskId || this.ids;
|
||||
this.$modal.confirm('是否确认手动出库该数据项?').then(function () {
|
||||
return runTASK(wmsOutTaskIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("执行成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 执行按钮操作 */
|
||||
handleAutoRun(row) {
|
||||
const wmsOutTaskIds = row.wmsOutTaskId || this.ids;
|
||||
this.$modal.confirm('是否确认WCS下发数据该数据项?').then(function () {
|
||||
return autoRunTASK(wmsOutTaskIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("执行成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const wmsOutTaskIds = row.wmsOutTaskId || this.ids;
|
||||
this.$modal.confirm('是否确认删除出库任务编号为"' + wmsOutTaskIds + '"的数据项?').then(function () {
|
||||
return delTASK(wmsOutTaskIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('md/TASK/export', {
|
||||
...this.queryParams
|
||||
}, `TASK_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user