修改入库管理权限
This commit is contained in:
@@ -271,7 +271,7 @@
|
||||
size="mini"
|
||||
:detailDisabled="single"
|
||||
@click="handleQualityInspection"
|
||||
v-hasPermi="['receive:stockin:edit']"
|
||||
v-hasPermi="['receive:stockInDetail:qualityInspection']"
|
||||
>质检
|
||||
</el-button>
|
||||
</el-col>
|
||||
@@ -283,7 +283,7 @@
|
||||
size="mini"
|
||||
:detailDisabled="multiple"
|
||||
@click="handleStockinDetailDelete"
|
||||
v-hasPermi="['receive:stockin:remove']"
|
||||
v-hasPermi="['receive:stockInDetail:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
@@ -303,7 +303,6 @@
|
||||
<el-table-column label="计划数量" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-dialog-drag-width="100"
|
||||
v-model="scope.row.quantity"
|
||||
:min="1"
|
||||
controls-position="right"
|
||||
@@ -342,7 +341,7 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleQualityInspection(scope.row)"
|
||||
v-hasPermi="['receive:stockInDetail:edit']"
|
||||
v-hasPermi="['receive:stockInDetail:qualityInspection']"
|
||||
>质检
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -358,11 +357,11 @@
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
v-show="detailTotal>0"
|
||||
:total="detailTotal"
|
||||
:page.sync="queryDetailParams.pageNum"
|
||||
:limit.sync="queryDetailParams.pageSize"
|
||||
@pagination="getDetailList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
@@ -399,6 +398,7 @@ export default {
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
detailTotal: 0,
|
||||
// 收货单据表格数据
|
||||
stockinList: [],
|
||||
stockInDetailList: [],
|
||||
@@ -581,27 +581,38 @@ export default {
|
||||
},
|
||||
//质检功能
|
||||
handleQualityInspection(row) {
|
||||
|
||||
const stockinDetailIds = row.stockinDetailId || this.detailIds
|
||||
|
||||
if (!stockinDetailIds || (Array.isArray(stockinDetailIds) && stockinDetailIds.length === 0)) {
|
||||
this.$modal.msgError("请选择需要质检的记录");
|
||||
return;
|
||||
}
|
||||
|
||||
let selectedDetails = [];
|
||||
// 如果是点击批量质检按钮,获取所有选中行的数据
|
||||
selectedDetails = this.stockInDetailList.filter(item =>
|
||||
stockinDetailIds.includes(item.stockinDetailId)
|
||||
).map(item => ({
|
||||
stockinDetailId: item.stockinDetailId,
|
||||
quantity: item.quantity,
|
||||
stockinId: item.stockinId
|
||||
}));
|
||||
stockinDetailIds.includes(item.stockinDetailId)
|
||||
).map(item => ({
|
||||
stockinDetailId: item.stockinDetailId,
|
||||
quantity: item.quantity,
|
||||
stockinId: item.stockinId
|
||||
}));
|
||||
|
||||
if (selectedDetails.length === 0) {
|
||||
this.$modal.msgError("未找到需要质检的记录");
|
||||
return;
|
||||
}
|
||||
|
||||
let data = {
|
||||
list: selectedDetails,
|
||||
stockinId: selectedDetails[0].stockinId
|
||||
};
|
||||
//console.log(data);
|
||||
|
||||
qualityInspection(data).then(response => {
|
||||
this.getDetailList(data.stockinId)
|
||||
this.$modal.msgSuccess("质检成功");
|
||||
}).catch(error => {
|
||||
this.$modal.msgError("质检失败:" + error.message);
|
||||
});
|
||||
},/**
|
||||
* 创建入库单
|
||||
|
||||
Reference in New Issue
Block a user