毛坯库存盘点,包装毛坯自动扣除,物料清单查看等功能完善,需要一定时间测试,不稳定

This commit is contained in:
2024-07-11 10:42:10 +08:00
parent 52ce5c72e5
commit f38057c904
5 changed files with 77 additions and 11 deletions

View File

@@ -34,7 +34,10 @@
<el-table-column prop="specification" label="规格" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="changeQuantity" label="变动数量" align="center">
<template slot-scope="scope">
<span style="font-weight: 700;">{{scope.row.type === 1? `+ ${scope.row.changeQuantity}` : `- ${scope.row.changeQuantity}`}}</span>
<span style="font-weight: 700;" v-if="scope.row.type === 1">{{`+ ${scope.row.changeQuantity}`}}</span>
<span style="font-weight: 700;" v-if="scope.row.type === 2">{{`- ${scope.row.changeQuantity}`}}</span>
<span style="font-weight: 700;" v-if="scope.row.type === 3">{{`- ${scope.row.changeQuantity}`}}</span>
<span style="font-weight: 700;" v-if="scope.row.type === 4">{{`${scope.row.changeQuantity}`}}</span>
</template>
</el-table-column>
<el-table-column prop="actionTime" label="入库/出库时间" align="center" min-width="160" :show-overflow-tooltip="true" />
@@ -43,7 +46,7 @@
<el-tag effect="plain" v-if="scope.row.type === 1" type="success">入库</el-tag>
<el-tag effect="plain" v-if="scope.row.type === 2" type="danger">出库</el-tag>
<el-tag effect="plain" v-if="scope.row.type === 3" type="danger">PDA上料出库</el-tag>
<el-tag effect="plain" v-if="scope.row.type === 4" type="warnging">盘点</el-tag>
<el-tag effect="plain" v-if="scope.row.type === 4" type="warning">盘点</el-tag>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注原因" align="center" :show-overflow-tooltip="true" />
@@ -90,7 +93,7 @@
<el-select v-model="formAdd.actionType">
<el-option label="入库" :value="1"></el-option>
<el-option label="出库" :value="2"></el-option>
<el-option label="盘点" :value="4" disabled></el-option>
<el-option label="盘点" :value="4"></el-option>
</el-select>
</el-form-item>
</el-col>
@@ -136,7 +139,8 @@
updateWmBlankRecord,
getWmBlankRecord,
addInventoryNum,
reduceInventoryNum
reduceInventoryNum,
doStocktakingBlankInventory
} from '@/api/wmsManagement/wmBlankRecord.js';
import {
getWmBlankInventory,
@@ -231,7 +235,7 @@
this.loading = false;
})
},
updateQuantity(){
updateQuantity() {
// 库存值更新
getWmBlankInventory(this.ItemData.id).then((res) => {
const { code, data } = res;
@@ -296,7 +300,7 @@
this.addDialogOpen = false;
}
})
} else {
} else if (this.formAdd.actionType === 2) {
// 出库
reduceInventoryNum(data).then(res => {
if (res.code === 200) {
@@ -311,9 +315,23 @@
this.addDialogOpen = false;
}
})
} else if (this.formAdd.actionType === 4) {
// 盘点
doStocktakingBlankInventory(data).then(res => {
if (res.code === 200) {
if (res.data < 1) {
this.$message.error("添加记录失败!");
return;
}
this.$message.success("添加记录成功!");
this.getList();
this.emitRefresh();
this.initData();
this.addDialogOpen = false;
}
})
}
}
}
}