feat(wms): 添加按实际库区查询库存和钢卷分布的功能
添加getStockByActual和getMaterialCoilDistributionByActualWarehouse API 修改库存和钢卷分布页面以支持按实际库区查询 移除合并页面中未使用的添加钢卷按钮
This commit is contained in:
@@ -84,6 +84,17 @@ export function getMaterialCoilDistributionByType(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询不同类型的钢卷在不同库区的分布情况
|
||||
export function getMaterialCoilDistributionByActualWarehouse(query) {
|
||||
return request({
|
||||
url: '/wms/materialCoil/distributionByActualWarehouse',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 钢卷分卷
|
||||
export function splitMaterialCoil(data) {
|
||||
return request({
|
||||
|
||||
@@ -9,6 +9,14 @@ export function listStock(query) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getStockByActual(query) {
|
||||
return request({
|
||||
url: '/wms/stock/listActual',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询库存:原材料/产品与库区/库位的存放关系详细
|
||||
export function getStock(stockId) {
|
||||
return request({
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMaterialCoilDistributionByType, getMaterialCoilDistributionByWarehouse } from "@/api/wms/coil";
|
||||
import { getMaterialCoilDistributionByType, getMaterialCoilDistributionByActualWarehouse } from "@/api/wms/coil";
|
||||
import MaterialSelect from "@/components/KLPService/MaterialSelect";
|
||||
import * as echarts from 'echarts';
|
||||
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
||||
@@ -183,7 +183,7 @@ export default {
|
||||
})
|
||||
} else if (this.queryParams.statType === '2') {
|
||||
// 仓库统计:物料字段无效,以仓库为核心
|
||||
getMaterialCoilDistributionByWarehouse(this.queryParams).then(res => {
|
||||
getMaterialCoilDistributionByActualWarehouse(this.queryParams).then(res => {
|
||||
this.list = res.data || [];
|
||||
this.updateCharts();
|
||||
this.loading = false;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="flow-left">
|
||||
<div class="flow-section-title">
|
||||
<span>源卷列表</span>
|
||||
<el-button v-if="!readonly" type="text" size="mini" @click="addSourceCoil" icon="el-icon-plus">添加钢卷</el-button>
|
||||
<!-- <el-button v-if="!readonly" type="text" size="mini" @click="addSourceCoil" icon="el-icon-plus">添加钢卷</el-button> -->
|
||||
</div>
|
||||
|
||||
<div class="source-list">
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listStock, delStock, addStock, updateStock } from "@/api/wms/stock";
|
||||
import { listStock, delStock, addStock, updateStock, getStockByActual } from "@/api/wms/stock";
|
||||
import { addStockIoWithDetail } from "@/api/wms/stockIo";
|
||||
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
|
||||
import ProductSelect from "@/components/KLPService/ProductSelect";
|
||||
@@ -247,11 +247,19 @@ export default {
|
||||
/** 查询库存列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listStock(this.queryParams).then(response => {
|
||||
this.stockList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
if (this.warehouseType === 'real') {
|
||||
getStockByActual(this.queryParams).then(response => {
|
||||
this.stockList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
} else {
|
||||
listStock(this.queryParams).then(response => {
|
||||
this.stockList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
// 树节点点击
|
||||
handleTreeSelect(node) {
|
||||
|
||||
Reference in New Issue
Block a user