✨ feat: 退库
This commit is contained in:
@@ -211,7 +211,7 @@
|
||||
|
||||
<script>
|
||||
import { listStockIoDetail, getStockIoDetail, delStockIoDetail, addStockIoDetail, updateStockIoDetail } from "@/api/wms/stockIoDetail";
|
||||
import { auditStockIo, updateStockIoStatus, cancelStockIo, getStockIo } from "@/api/wms/stockIo";
|
||||
import { auditStockIo, updateStockIoStatus, cancelStockIo, getStockIo, returnStock } from "@/api/wms/stockIo";
|
||||
import WarehouseSelect from '@/components/WarehouseSelect';
|
||||
import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect';
|
||||
import ProductSelect from '@/components/KLPService/ProductSelect';
|
||||
@@ -330,6 +330,20 @@ export default {
|
||||
// 确认审核
|
||||
this.$modal.confirm('确认要审核此出入库单吗?审核后将影响库存数据。').then(() => {
|
||||
this.auditLoading = true;
|
||||
// 如果是退库单,则需要先审核出库单
|
||||
if (this.stockIo.ioType === 'withdraw') {
|
||||
returnStock(this.stockIo).then(response => {
|
||||
this.$modal.msgSuccess('审核成功');
|
||||
this.$set(this.stockIo, 'status', 2);
|
||||
// 刷新明细列表
|
||||
this.getList();
|
||||
// 通知父组件状态已更新
|
||||
this.$emit('status-changed', this.stockIo);
|
||||
}).finally(() => {
|
||||
this.auditLoading = false;
|
||||
})
|
||||
return;
|
||||
}
|
||||
auditStockIo(this.stockIo.stockIoId).then(response => {
|
||||
this.$modal.msgSuccess('审核成功');
|
||||
// 更新主表状态
|
||||
|
||||
Reference in New Issue
Block a user