✨ feat: 退库
This commit is contained in:
@@ -2,21 +2,13 @@
|
||||
<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="stockIoCode">
|
||||
<el-input
|
||||
v-model="queryParams.stockIoCode"
|
||||
placeholder="请输入出入库单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.stockIoCode" placeholder="请输入出入库单号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="bizType">
|
||||
<el-select v-model="queryParams.bizType" placeholder="请选择业务类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.stock_biz_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<el-option v-for="dict in dict.type.stock_biz_type" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
@@ -34,53 +26,25 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
|
||||
>新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
|
||||
>修改</el-button>
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
|
||||
@click="handleUpdate">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
|
||||
>删除</el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
|
||||
@click="handleDelete">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
|
||||
>导出</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="stockIoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="出入库单ID" align="center" prop="stockIoId" v-if="true"/>
|
||||
<el-table-column label="出入库单ID" align="center" prop="stockIoId" v-if="true" />
|
||||
<el-table-column label="出入库单号" align="center" prop="stockIoCode" />
|
||||
<el-table-column label="类型" align="center" prop="ioType">
|
||||
<template slot-scope="scope">
|
||||
@@ -106,36 +70,18 @@
|
||||
<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)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-document"
|
||||
@click="showDetail(scope.row)"
|
||||
>明细</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-document" @click="showDetail(scope.row)">明细</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-document"
|
||||
v-if="scope.row.ioType === 'out' && scope.row.status === 2"
|
||||
@click="showReturnCreate(scope.row)">退库</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"
|
||||
/>
|
||||
<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="600px" append-to-body>
|
||||
@@ -145,12 +91,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="bizType">
|
||||
<el-select v-model="form.bizType" placeholder="请选择业务类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.stock_biz_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
<el-option v-for="dict in dict.type.stock_biz_type" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
@@ -166,17 +108,12 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 明细弹窗 -->
|
||||
<el-dialog
|
||||
title="单据明细"
|
||||
:visible.sync="detailDialogVisible"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
@close="onDetailClosed"
|
||||
>
|
||||
<StockIoDetailPanel
|
||||
:stockIo="detailStockIo"
|
||||
@status-changed="onStatusChanged"
|
||||
/>
|
||||
<el-dialog title="单据明细" :visible.sync="detailDialogVisible" width="1000px" append-to-body @close="onDetailClosed">
|
||||
<StockIoDetailPanel :stockIo="detailStockIo" @status-changed="onStatusChanged" />
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="退库单" :visible.sync="returnCreateDialogVisible" width="1000px" append-to-body>
|
||||
<ReturnCreatePanel :stockIo="form" @finish="returnCreateDialogVisible = false" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -184,11 +121,12 @@
|
||||
<script>
|
||||
import { listStockIo, getStockIo, delStockIo, addStockIo, updateStockIo } from "@/api/wms/stockIo";
|
||||
import StockIoDetailPanel from './detail.vue';
|
||||
import ReturnCreatePanel from './returnCreate.vue';
|
||||
|
||||
export default {
|
||||
name: "StockIo",
|
||||
dicts: ['stock_biz_type', 'stock_status'],
|
||||
components: { StockIoDetailPanel },
|
||||
components: { StockIoDetailPanel, ReturnCreatePanel },
|
||||
props: {
|
||||
ioType: {
|
||||
require: true
|
||||
@@ -253,6 +191,7 @@ export default {
|
||||
},
|
||||
detailDialogVisible: false,
|
||||
detailStockIo: null,
|
||||
returnCreateDialogVisible: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -303,7 +242,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.stockIoId)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
@@ -415,7 +354,11 @@ export default {
|
||||
other: '其他'
|
||||
};
|
||||
return map[type] || type;
|
||||
},
|
||||
showReturnCreate(row) {
|
||||
this.returnCreateDialogVisible = true;
|
||||
this.form = { ...row };
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user