盘点管理 单据确认 单据审核 单据作废 盘点新增

This commit is contained in:
liuhanqing
2025-06-03 18:02:02 +08:00
parent 9067c125a8
commit cf8ad90962
14 changed files with 6932 additions and 862 deletions

View File

@@ -19,10 +19,10 @@
clearable
/>
</el-form-item>
<el-form-item label="单据类型" prop="outType" required>
<el-select v-model="formData.outType" placeholder="请选择单据类型" clearable>
<el-form-item label="单据类型" prop="checkType" required>
<el-select v-model="formData.checkType" placeholder="请选择单据类型" clearable>
<el-option
v-for="dict in dict.type.out_bill_type"
v-for="dict in dict.type.check_stock_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@@ -44,7 +44,11 @@
<el-table v-loading="loading" :data="materialList">
<el-table-column label="物资编号" align="center" prop="productId" />
<el-table-column label="物资名称" align="center" prop="productName" />
<el-table-column label="批号" align="center" prop="lotNo" />
<el-table-column label="批号" align="center" prop="lotNo">
<template slot-scope="scope">
<el-input v-model="scope.row.lotNo" size="mini" placeholder="请输入批号" />
</template>
</el-table-column>
<el-table-column label="数量" align="center" prop="quantity">
<template slot-scope="scope">
<el-input-number v-model="scope.row.quantity" :min="1" size="mini" @change="handleQuantityChange(scope.row)" />
@@ -102,7 +106,11 @@
<el-table-column type="selection" width="55" />
<el-table-column label="物资编码" align="center" prop="productId" />
<el-table-column label="物资名称" align="center" prop="productName" />
<el-table-column label="批号" align="center" prop="lotNo" />
<!-- <el-table-column label="批号" align="center" prop="lotNo">
<template slot-scope="scope">
<el-input v-model="scope.row.lotNo" size="mini" placeholder="请输入批号" />
</template>
</el-table-column> -->
<el-table-column label="数量" align="center" prop="quantity" />
<!-- <el-table-column label="仓库" align="center" prop="warehouseId" /> -->
</el-table>
@@ -116,12 +124,13 @@
</template>
<script>
import { listProductAndStock,saveOutStock } from "@/api/out/outStockout";
import { listProductAndStock } from "@/api/out/outStockout";
import {listWarehouse} from "@/api/bas/warehouse";
import {saveCheckStock} from "@/api/check/stockCheck";
export default {
name: "AddOutStock",
dicts: ['out_bill_type', 'bill_status'],
dicts: ['check_stock_type', 'bill_status'],
data() {
return {
// 遮罩层
@@ -143,7 +152,7 @@
formData: {
warehouseId: null,
customerNo: null,
outType: null
checkType: null
},
// 仓库选项
warehouseOptions: [],
@@ -215,6 +224,7 @@
this.materialList = this.materialList.concat(
newMaterials.map(item => ({
productId: item.productId,
productGuId: item.productGuid,
productName: item.productName,
quantity: item.quantity,
quantityOrignal: item.quantity,
@@ -263,11 +273,11 @@
return;
}
const data = {
outStockout: this.formData,
checkStockin: this.formData,
detailList: this.materialList
};
// 这里需要调用保存接口
saveOutStock(data).then(response => {
saveCheckStock(data).then(response => {
console.log(response)
this.$modal.msgSuccess("单据"+response.msg+"保存成功");
this.$tab.refreshPage(this.$route);