parent
687c644217
commit
c644b07717
@ -0,0 +1,96 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询原材料退库记录列表
|
||||||
|
export function listRawreturn(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/rawreturn/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询原材料退库记录详细
|
||||||
|
export function getRawreturn(rawReturnId) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/rawreturn/' + rawReturnId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增原材料退库记录
|
||||||
|
export function addRawreturn(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/rawreturn',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改原材料退库记录
|
||||||
|
export function updateRawreturn(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/rawreturn',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除原材料退库记录
|
||||||
|
export function delRawreturn(rawReturnId) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/rawreturn/' + rawReturnId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 查询原材料退库记录列表,提供给审核使用
|
||||||
|
export function auditListRawreturn(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/rawreturn/auditList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询原材料退库记录详细
|
||||||
|
export function getRawreturn4Audit(rawReturnId) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/rawreturn/getRawreturn4Audit/' + rawReturnId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 审核原材料退库记录
|
||||||
|
export function auditRawReturn(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/rawreturn/auditRawReturn',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 查询仓库列表,提供审核使用
|
||||||
|
export function getWarehouses4Audit() {
|
||||||
|
return request({
|
||||||
|
url: '/wms/rawreturn/getWarehouses4Audit',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 查询仓库列表,提供记录查询使用
|
||||||
|
export function getWarehouses() {
|
||||||
|
return request({
|
||||||
|
url: '/wms/rawreturn/getWarehouses',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
@ -0,0 +1,257 @@
|
|||||||
|
<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">
|
||||||
|
<el-option
|
||||||
|
v-for="item in warehouseOptions"
|
||||||
|
:key="item.warehouseId"
|
||||||
|
:label="item.warehouseName"
|
||||||
|
:value="item.warehouseId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="计划编号" prop="planCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.planCode"
|
||||||
|
placeholder="请输入计划编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="明细编号" prop="planDetailCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.planDetailCode"
|
||||||
|
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="taskType">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.taskType"
|
||||||
|
placeholder="请选择退库类型"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.wms_raw_return_task_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</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-table v-loading="loading" :data="rawreturnList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
|
<el-table-column label="任务编号" align="center" prop="taskCode"/>
|
||||||
|
<el-table-column label="仓库" align="center" prop="warehouseName"/>
|
||||||
|
<el-table-column label="计划编号" align="center" prop="planCode"/>
|
||||||
|
<el-table-column label="计划明细编号" align="center" prop="planDetailCode"/>
|
||||||
|
<el-table-column label="物料条码" align="center" prop="materialBarcode"/>
|
||||||
|
<el-table-column label="计划退库数量" align="center" prop="planAmount"/>
|
||||||
|
<el-table-column label="退库类型" align="center" prop="taskType">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wms_raw_return_task_type" :value="scope.row.taskType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<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}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="申请原因" align="center" prop="applyReason"/>
|
||||||
|
<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-info"
|
||||||
|
@click="handleDetail(scope.row)"
|
||||||
|
v-hasPermi="['wms:rawreturn:audit:query']"
|
||||||
|
>查看
|
||||||
|
</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"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {listRawreturn, getWarehouses,} from "@/api/wms/rawreturn";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Rawreturn",
|
||||||
|
dicts: ['wms_audit_status', 'wms_execute_status', 'wms_raw_return_task_type'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 子表选中数据
|
||||||
|
checkedWmsRawReturnDetail: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 原材料退库记录表格数据
|
||||||
|
rawreturnList: [],
|
||||||
|
// 原材料退库记录明细表格数据
|
||||||
|
wmsRawReturnDetailList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
taskCode: null,
|
||||||
|
warehouseId: null,
|
||||||
|
locationCode: null,
|
||||||
|
planCode: null,
|
||||||
|
planDetailCode: null,
|
||||||
|
productId: null,
|
||||||
|
materialId: null,
|
||||||
|
materialBarcode: null,
|
||||||
|
batchCode: null,
|
||||||
|
planAmount: null,
|
||||||
|
returnAmount: null,
|
||||||
|
operationType: null,
|
||||||
|
taskType: null,
|
||||||
|
endStationCode: null,
|
||||||
|
applyReason: null,
|
||||||
|
auditReason: null,
|
||||||
|
auditStatus: null,
|
||||||
|
executeStatus: null,
|
||||||
|
applyBy: null,
|
||||||
|
applyDate: null,
|
||||||
|
auditBy: null,
|
||||||
|
auditDate: null,
|
||||||
|
updateDate: null,
|
||||||
|
beginTime: null,
|
||||||
|
endTime: null,
|
||||||
|
erpStatus: null,
|
||||||
|
erpAmount: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
// 仓库列表
|
||||||
|
warehouseOptions: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.getWarehouseList();
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
const time = this.$route.query.t;
|
||||||
|
if (time != null && time != this.uniqueId) {
|
||||||
|
this.uniqueId = time;
|
||||||
|
this.queryParams.pageNum = Number(this.$route.query.pageNum);
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询原材料退库记录列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listRawreturn(this.queryParams).then(response => {
|
||||||
|
this.rawreturnList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 查询仓库列表 */
|
||||||
|
getWarehouseList() {
|
||||||
|
getWarehouses().then(response => {
|
||||||
|
this.warehouseOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.rawReturnId)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 审核按钮操作 */
|
||||||
|
handleDetail(row) {
|
||||||
|
const rawReturnId = row.rawReturnId
|
||||||
|
const taskCode = row.taskCode
|
||||||
|
const warehouseName = row.warehouseName;
|
||||||
|
const params = {pageNum: this.queryParams.pageNum};
|
||||||
|
this.$tab.openPage("退库详情[" + taskCode + "]", '/wms/raw-return/detail/' + rawReturnId + '/1/' + warehouseName, params);
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('wms/rawreturn/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `rawreturn_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,280 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form ref="form" :model="form" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="任务编号" prop="taskCode">
|
||||||
|
<el-input v-model="form.taskCode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="仓库" prop="warehouseName">
|
||||||
|
<el-input v-model="form.warehouseName" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="计划编号" prop="planCode">
|
||||||
|
<el-input v-model="form.planCode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="明细编号" prop="planDetailCode">
|
||||||
|
<el-input v-model="form.planDetailCode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="成品名称" prop="productName">
|
||||||
|
<el-input v-model="form.productName" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="物料名称" prop="materialName">
|
||||||
|
<el-input v-model="form.materialName" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="物料条码" prop="materialBarcode">
|
||||||
|
<el-input v-model="form.materialBarcode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="批次码" prop="batchCode">
|
||||||
|
<el-input v-model="form.batchCode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="计划退库数量" prop="planAmount">
|
||||||
|
<el-input v-model="form.planAmount" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2" v-if="detailFlag">
|
||||||
|
<el-form-item label="已退库数量" prop="returnAmount">
|
||||||
|
<el-input v-model="form.returnAmount" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="申请人" prop="applyBy">
|
||||||
|
<el-input v-model="form.applyBy" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="申请时间" prop="applyDate">
|
||||||
|
<el-input v-model="form.applyDate" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="16" :offset="2">
|
||||||
|
<el-form-item label="申请原因" prop="applyReason">
|
||||||
|
<el-input v-model="form.applyReason" type="textarea" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row v-if="detailFlag">
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="审核人" prop="auditBy">
|
||||||
|
<el-input v-model="form.auditBy" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="审核时间" prop="auditDate">
|
||||||
|
<el-input v-model="form.auditDate" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="16" :offset="2">
|
||||||
|
<el-form-item label="审核原因" prop="auditReason">
|
||||||
|
<el-input v-model="form.auditReason" type="textarea" :disabled="detailFlag"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row v-if="detailFlag">
|
||||||
|
<el-col :span="16" :offset="2">
|
||||||
|
<el-form-item label="同步ERP数量" prop="erpAmount">
|
||||||
|
<el-input v-model="form.erpAmount" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
<el-row v-if="detailFlag">
|
||||||
|
<el-col :span="6" :offset="2">
|
||||||
|
<el-form-item label="退库类型" prop="taskType">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wms_raw_return_task_type" :value="form.taskType"/>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" :offset="2">
|
||||||
|
<el-form-item label="审核状态" prop="auditStatus">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wms_audit_status" :value="form.auditStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" :offset="2">
|
||||||
|
<el-form-item label="执行状态" prop="executeStatus">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wms_execute_status" :value="form.executeStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="auditPass" v-if="!detailFlag">审核通过</el-button>
|
||||||
|
<el-button type="primary" @click="auditFail" v-if="!detailFlag">审核不通过</el-button>
|
||||||
|
<el-button @click="cancel">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {auditRawReturn, getRawreturn} from "@/api/wms/rawreturn";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Rawreturn",
|
||||||
|
dicts: ["wms_audit_status","wms_erp_status","wms_execute_status","wms_raw_return_task_type"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 子表选中数据
|
||||||
|
checkedWmsRawReturnDetail: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 原材料退库记录表格数据
|
||||||
|
rawreturnList: [],
|
||||||
|
// 原材料退库记录明细表格数据
|
||||||
|
wmsRawReturnDetailList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
|
||||||
|
detailFlag: true,
|
||||||
|
rawReturnId: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const rawReturnId = this.$route.params && this.$route.params.rawReturnId;
|
||||||
|
const taskCode = this.$route.params && this.$route.params.taskCode;
|
||||||
|
const detailFlag = this.$route.params && this.$route.params.detailFlag;
|
||||||
|
const warehouseName = this.$route.params && this.$route.params.warehouseName;
|
||||||
|
this.detailFlag = detailFlag == "1";
|
||||||
|
this.form.taskCode = taskCode;
|
||||||
|
this.warehouseName = warehouseName;
|
||||||
|
this.rawReturnId = rawReturnId;
|
||||||
|
this.getRawReturn();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询原材料退库记录列表 */
|
||||||
|
getRawReturn() {
|
||||||
|
this.loading = true;
|
||||||
|
getRawreturn(this.rawReturnId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.form.warehouseName = this.warehouseName;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
const obj = {path: "/wms/info/rawreturn", query: {t: Date.now(), pageNum: this.$route.query.pageNum}};
|
||||||
|
this.$tab.closeOpenPage(obj);
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
rawReturnId: null,
|
||||||
|
taskCode: null,
|
||||||
|
warehouseId: null,
|
||||||
|
locationCode: null,
|
||||||
|
planCode: null,
|
||||||
|
planDetailCode: null,
|
||||||
|
productId: null,
|
||||||
|
materialId: null,
|
||||||
|
materialBarcode: null,
|
||||||
|
batchCode: null,
|
||||||
|
planAmount: null,
|
||||||
|
returnAmount: null,
|
||||||
|
operationType: null,
|
||||||
|
taskType: null,
|
||||||
|
endStationCode: null,
|
||||||
|
applyReason: null,
|
||||||
|
auditReason: null,
|
||||||
|
auditStatus: null,
|
||||||
|
executeStatus: null,
|
||||||
|
applyBy: null,
|
||||||
|
applyDate: null,
|
||||||
|
auditBy: null,
|
||||||
|
auditDate: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateDate: null,
|
||||||
|
beginTime: null,
|
||||||
|
endTime: null,
|
||||||
|
erpStatus: null,
|
||||||
|
erpAmount: null
|
||||||
|
};
|
||||||
|
this.wmsRawReturnDetailList = [];
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
auditPass() {
|
||||||
|
this.form.auditStatus = "1";
|
||||||
|
this.submitForm();
|
||||||
|
},
|
||||||
|
|
||||||
|
auditFail() {
|
||||||
|
this.form.auditStatus = "2";
|
||||||
|
if (!this.form.auditReason || this.form.auditReason == "" || this.form.auditReason == undefined) {
|
||||||
|
this.$modal.msgWarning("请输入审核原因!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.submitForm();
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
auditRawReturn(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("保存成功");
|
||||||
|
this.cancel();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,221 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="任务编号" prop="taskCode">
|
||||||
|
<el-input v-model="form.taskCode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="仓库" prop="warehouseName">
|
||||||
|
<el-input v-model="form.warehouseName" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="计划编号" prop="planCode">
|
||||||
|
<el-input v-model="form.planCode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="明细编号" prop="planDetailCode">
|
||||||
|
<el-input v-model="form.planDetailCode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="申请人" prop="applyBy">
|
||||||
|
<el-input v-model="form.applyBy" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="申请时间" prop="applyDate">
|
||||||
|
<el-input v-model="form.applyDate" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="16" :offset="2">
|
||||||
|
<el-form-item label="申请原因" prop="applyReason">
|
||||||
|
<el-input v-model="form.applyReason" type="textarea" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
<el-row v-if="detailFlag">
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="审核人" prop="auditBy">
|
||||||
|
<el-input v-model="form.auditBy" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="审核时间" prop="auditDate">
|
||||||
|
<el-input v-model="form.auditDate" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="16" :offset="2">
|
||||||
|
<el-form-item label="出库类型" prop="taskType">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wms_raw_outstock_task_type" :value="form.taskType"/>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="16" :offset="2">
|
||||||
|
<el-form-item label="审核原因" prop="auditReason">
|
||||||
|
<el-input v-model="form.auditReason" type="textarea" :disabled="detailFlag"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row v-if="detailFlag">
|
||||||
|
<el-col :span="16" :offset="2">
|
||||||
|
<el-form-item label="审核状态" prop="auditStatus">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wms_audit_status" :value="form.auditStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-divider content-position="center">原材料申请明细信息</el-divider>
|
||||||
|
<el-table :data="wmsRawOutstockDetailList" :row-class-name="rowWmsRawOutstockDetailIndex"
|
||||||
|
ref="wmsRawOutstockDetail">
|
||||||
|
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||||
|
<el-table-column label="库位编码" prop="locationCode"/>
|
||||||
|
<el-table-column label="物料名称" prop="materialName"/>
|
||||||
|
<el-table-column label="物料批次" prop="instockBatch"/>
|
||||||
|
<el-table-column label="计划数量" prop="planAmount"/>
|
||||||
|
<el-table-column label="出库数量" prop="outstockAmount" v-if="detailFlag"/>
|
||||||
|
<el-table-column label="执行状态" prop="executeStatus" v-if="detailFlag">
|
||||||
|
<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状态" prop="erpStatus" v-if="detailFlag">
|
||||||
|
<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数量" prop="erpAmount" v-if="detailFlag"/>
|
||||||
|
</el-table>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="auditPass" v-if="!detailFlag">审核通过</el-button>
|
||||||
|
<el-button type="primary" @click="auditFail" v-if="!detailFlag">审核不通过</el-button>
|
||||||
|
<el-button @click="cancel">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getRawOutstockByTaskCode,
|
||||||
|
auditRawOutstock,
|
||||||
|
} from "@/api/wms/rawoutstock";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
dicts: ['wms_audit_status', 'wms_execute_status', 'wms_erp_status','wms_raw_outstock_task_type'],
|
||||||
|
name: "Rawoutstock",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 子表选中数据
|
||||||
|
checkedWmsRawOutstockDetail: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 原材料出库记录表格数据
|
||||||
|
rawoutstockList: [],
|
||||||
|
// 原材料出库记录明细表格数据
|
||||||
|
wmsRawOutstockDetailList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
detailFlag: true,
|
||||||
|
warehouseName: '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const taskCode = this.$route.params && this.$route.params.taskCode;
|
||||||
|
const detailFlag = this.$route.params && this.$route.params.detailFlag;
|
||||||
|
const warehouseName = this.$route.params && this.$route.params.warehouseName;
|
||||||
|
this.detailFlag = detailFlag == "1";
|
||||||
|
this.form.taskCode = taskCode;
|
||||||
|
this.warehouseName = warehouseName;
|
||||||
|
this.getRawOutstockByTaskCode();
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 根据任务编号获取出库明细 */
|
||||||
|
getRawOutstockByTaskCode() {
|
||||||
|
getRawOutstockByTaskCode(this.form.taskCode).then(response => {
|
||||||
|
this.form = response.data.wmsRawOutstock;
|
||||||
|
this.form.warehouseName = this.warehouseName;
|
||||||
|
this.wmsRawOutstockDetailList = response.data.wmsRawOutstockDetailList;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改原材料出库记录";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 原材料出库记录明细序号 */
|
||||||
|
rowWmsRawOutstockDetailIndex({row, rowIndex}) {
|
||||||
|
row.index = rowIndex + 1;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
const obj = {path: "/wms/rawmanagement/rawoutstock", query: {t: Date.now(), pageNum: this.$route.query.pageNum}};
|
||||||
|
this.$tab.closeOpenPage(obj);
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
auditPass() {
|
||||||
|
this.form.auditStatus = "1";
|
||||||
|
this.submitForm();
|
||||||
|
},
|
||||||
|
|
||||||
|
auditFail() {
|
||||||
|
this.form.auditStatus = "2";
|
||||||
|
if (!this.form.auditReason || this.form.auditReason == "" || this.form.auditReason == undefined) {
|
||||||
|
this.$modal.msgWarning("请输入审核原因!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.submitForm();
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
auditRawOutstock(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("保存成功");
|
||||||
|
this.cancel();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,254 @@
|
|||||||
|
<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">
|
||||||
|
<el-option
|
||||||
|
v-for="item in warehouseOptions"
|
||||||
|
:key="item.warehouseId"
|
||||||
|
:label="item.warehouseName"
|
||||||
|
:value="item.warehouseId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="计划编号" prop="planCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.planCode"
|
||||||
|
placeholder="请输入计划编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="明细编号" prop="planDetailCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.planDetailCode"
|
||||||
|
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="taskType">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.taskType"
|
||||||
|
placeholder="请选择退库类型"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.wms_raw_return_task_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</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-table v-loading="loading" :data="rawreturnList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="任务编号" align="center" prop="taskCode" />
|
||||||
|
<el-table-column label="仓库" align="center" prop="warehouseName" />
|
||||||
|
<el-table-column label="计划编号" align="center" prop="planCode" />
|
||||||
|
<el-table-column label="计划明细编号" align="center" prop="planDetailCode" />
|
||||||
|
<el-table-column label="物料条码" align="center" prop="materialBarcode" />
|
||||||
|
<el-table-column label="计划退库数量" align="center" prop="planAmount" />
|
||||||
|
<el-table-column label="任务类型" align="center" prop="taskType" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wms_raw_return_task_type" :value="scope.row.taskType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<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}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="申请原因" align="center" prop="applyReason" />
|
||||||
|
<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-lock"
|
||||||
|
@click="handleAudit(scope.row)"
|
||||||
|
v-hasPermi="['wms:rawreturn:audit:query']"
|
||||||
|
>审核</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"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { auditListRawreturn,getWarehouses4Audit } from "@/api/wms/rawreturn";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Rawreturn",
|
||||||
|
dicts: ['wms_audit_status', 'wms_execute_status', 'wms_raw_return_task_type'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 子表选中数据
|
||||||
|
checkedWmsRawReturnDetail: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 原材料退库记录表格数据
|
||||||
|
rawreturnList: [],
|
||||||
|
// 原材料退库记录明细表格数据
|
||||||
|
wmsRawReturnDetailList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
taskCode: null,
|
||||||
|
warehouseId: null,
|
||||||
|
locationCode: null,
|
||||||
|
planCode: null,
|
||||||
|
planDetailCode: null,
|
||||||
|
productId: null,
|
||||||
|
materialId: null,
|
||||||
|
materialBarcode: null,
|
||||||
|
batchCode: null,
|
||||||
|
planAmount: null,
|
||||||
|
returnAmount: null,
|
||||||
|
operationType: null,
|
||||||
|
taskType: null,
|
||||||
|
endStationCode: null,
|
||||||
|
applyReason: null,
|
||||||
|
auditReason: null,
|
||||||
|
auditStatus: '0',
|
||||||
|
executeStatus: null,
|
||||||
|
applyBy: null,
|
||||||
|
applyDate: null,
|
||||||
|
auditBy: null,
|
||||||
|
auditDate: null,
|
||||||
|
updateDate: null,
|
||||||
|
beginTime: null,
|
||||||
|
endTime: null,
|
||||||
|
erpStatus: null,
|
||||||
|
erpAmount: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
// 仓库列表
|
||||||
|
warehouseOptions: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.getWarehouseList();
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
const time = this.$route.query.t;
|
||||||
|
if (time != null && time != this.uniqueId) {
|
||||||
|
this.uniqueId = time;
|
||||||
|
this.queryParams.pageNum = Number(this.$route.query.pageNum);
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询原材料退库记录列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
auditListRawreturn(this.queryParams).then(response => {
|
||||||
|
this.rawreturnList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 查询仓库列表 */
|
||||||
|
getWarehouseList() {
|
||||||
|
getWarehouses4Audit().then(response => {
|
||||||
|
this.warehouseOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.rawReturnId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 审核按钮操作 */
|
||||||
|
handleAudit(row) {
|
||||||
|
const rawReturnId = row.rawReturnId
|
||||||
|
const taskCode = row.taskCode
|
||||||
|
const warehouseName = row.warehouseName;
|
||||||
|
const params = {pageNum: this.queryParams.pageNum};
|
||||||
|
this.$tab.openPage("退库审核[" + taskCode + "]", '/wms/raw-return/audit/' + rawReturnId+'/0/'+warehouseName, params);
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('wms/rawreturn/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `rawreturn_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,284 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form ref="form" :model="form" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="任务编号" prop="taskCode">
|
||||||
|
<el-input v-model="form.taskCode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="仓库" prop="warehouseName">
|
||||||
|
<el-input v-model="form.warehouseName" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="计划编号" prop="planCode">
|
||||||
|
<el-input v-model="form.planCode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="明细编号" prop="planDetailCode">
|
||||||
|
<el-input v-model="form.planDetailCode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="成品名称" prop="productName">
|
||||||
|
<el-input v-model="form.productName" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="物料名称" prop="materialName">
|
||||||
|
<el-input v-model="form.materialName" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="物料条码" prop="materialBarcode">
|
||||||
|
<el-input v-model="form.materialBarcode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="批次码" prop="batchCode">
|
||||||
|
<el-input v-model="form.batchCode" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="计划退库数量" prop="planAmount">
|
||||||
|
<el-input v-model="form.planAmount" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2" v-if="detailFlag">
|
||||||
|
<el-form-item label="已退库数量" prop="returnAmount">
|
||||||
|
<el-input v-model="form.returnAmount" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="申请人" prop="applyBy">
|
||||||
|
<el-input v-model="form.applyBy" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="申请时间" prop="applyDate">
|
||||||
|
<el-input v-model="form.applyDate" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="16" :offset="2">
|
||||||
|
<el-form-item label="申请原因" prop="applyReason">
|
||||||
|
<el-input v-model="form.applyReason" type="textarea" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="16" :offset="2">
|
||||||
|
<el-form-item label="退库类型" prop="taskType">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wms_raw_return_task_type" :value="form.taskType"/>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row v-if="detailFlag">
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="审核人" prop="auditBy">
|
||||||
|
<el-input v-model="form.auditBy" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="审核时间" prop="auditDate">
|
||||||
|
<el-input v-model="form.auditDate" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="16" :offset="2">
|
||||||
|
<el-form-item label="审核原因" prop="auditReason">
|
||||||
|
<el-input v-model="form.auditReason" type="textarea" :disabled="detailFlag"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row v-if="detailFlag">
|
||||||
|
<el-col :span="16" :offset="2">
|
||||||
|
<el-form-item label="同步ERP数量" prop="erpAmount">
|
||||||
|
<el-input v-model="form.erpAmount" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
<el-row v-if="detailFlag">
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="审核状态" prop="auditStatus">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wms_audit_status" :value="form.auditStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-form-item label="执行状态" prop="executeStatus">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wms_execute_status" :value="form.executeStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="auditPass" v-if="!detailFlag">审核通过</el-button>
|
||||||
|
<el-button type="primary" @click="auditFail" v-if="!detailFlag">审核不通过</el-button>
|
||||||
|
<el-button @click="cancel">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {auditRawReturn, getRawreturn4Audit} from "@/api/wms/rawreturn";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Rawreturn",
|
||||||
|
dicts: ["wms_audit_status","wms_erp_status","wms_execute_status","wms_raw_return_task_type"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 子表选中数据
|
||||||
|
checkedWmsRawReturnDetail: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 原材料退库记录表格数据
|
||||||
|
rawreturnList: [],
|
||||||
|
// 原材料退库记录明细表格数据
|
||||||
|
wmsRawReturnDetailList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
|
||||||
|
detailFlag: true,
|
||||||
|
rawReturnId: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const rawReturnId = this.$route.params && this.$route.params.rawReturnId;
|
||||||
|
const taskCode = this.$route.params && this.$route.params.taskCode;
|
||||||
|
const detailFlag = this.$route.params && this.$route.params.detailFlag;
|
||||||
|
const warehouseName = this.$route.params && this.$route.params.warehouseName;
|
||||||
|
this.detailFlag = detailFlag == "1";
|
||||||
|
this.form.taskCode = taskCode;
|
||||||
|
this.warehouseName = warehouseName;
|
||||||
|
this.rawReturnId = rawReturnId;
|
||||||
|
this.getRawReturn();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询原材料退库记录列表 */
|
||||||
|
getRawReturn() {
|
||||||
|
this.loading = true;
|
||||||
|
getRawreturn4Audit(this.rawReturnId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.form.warehouseName = this.warehouseName;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
const obj = {path: "/wms/rawmanagement/rawreturn", query: {t: Date.now(), pageNum: this.$route.query.pageNum}};
|
||||||
|
this.$tab.closeOpenPage(obj);
|
||||||
|
},
|
||||||
|
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
rawReturnId: null,
|
||||||
|
taskCode: null,
|
||||||
|
warehouseId: null,
|
||||||
|
locationCode: null,
|
||||||
|
planCode: null,
|
||||||
|
planDetailCode: null,
|
||||||
|
productId: null,
|
||||||
|
materialId: null,
|
||||||
|
materialBarcode: null,
|
||||||
|
batchCode: null,
|
||||||
|
planAmount: null,
|
||||||
|
returnAmount: null,
|
||||||
|
operationType: null,
|
||||||
|
taskType: null,
|
||||||
|
endStationCode: null,
|
||||||
|
applyReason: null,
|
||||||
|
auditReason: null,
|
||||||
|
auditStatus: null,
|
||||||
|
executeStatus: null,
|
||||||
|
applyBy: null,
|
||||||
|
applyDate: null,
|
||||||
|
auditBy: null,
|
||||||
|
auditDate: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateDate: null,
|
||||||
|
beginTime: null,
|
||||||
|
endTime: null,
|
||||||
|
erpStatus: null,
|
||||||
|
erpAmount: null
|
||||||
|
};
|
||||||
|
this.wmsRawReturnDetailList = [];
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
auditPass() {
|
||||||
|
this.form.auditStatus = "1";
|
||||||
|
this.submitForm();
|
||||||
|
},
|
||||||
|
|
||||||
|
auditFail() {
|
||||||
|
this.form.auditStatus = "2";
|
||||||
|
if (!this.form.auditReason || this.form.auditReason == "" || this.form.auditReason == undefined) {
|
||||||
|
this.$modal.msgWarning("请输入审核原因!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.submitForm();
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
auditRawReturn(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("保存成功");
|
||||||
|
this.cancel();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in New Issue