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) {
|
export function splitMaterialCoil(data) {
|
||||||
return request({
|
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) {
|
export function getStock(stockId) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getMaterialCoilDistributionByType, getMaterialCoilDistributionByWarehouse } from "@/api/wms/coil";
|
import { getMaterialCoilDistributionByType, getMaterialCoilDistributionByActualWarehouse } from "@/api/wms/coil";
|
||||||
import MaterialSelect from "@/components/KLPService/MaterialSelect";
|
import MaterialSelect from "@/components/KLPService/MaterialSelect";
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
||||||
@@ -183,7 +183,7 @@ export default {
|
|||||||
})
|
})
|
||||||
} else if (this.queryParams.statType === '2') {
|
} else if (this.queryParams.statType === '2') {
|
||||||
// 仓库统计:物料字段无效,以仓库为核心
|
// 仓库统计:物料字段无效,以仓库为核心
|
||||||
getMaterialCoilDistributionByWarehouse(this.queryParams).then(res => {
|
getMaterialCoilDistributionByActualWarehouse(this.queryParams).then(res => {
|
||||||
this.list = res.data || [];
|
this.list = res.data || [];
|
||||||
this.updateCharts();
|
this.updateCharts();
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<div class="flow-left">
|
<div class="flow-left">
|
||||||
<div class="flow-section-title">
|
<div class="flow-section-title">
|
||||||
<span>源卷列表</span>
|
<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>
|
||||||
|
|
||||||
<div class="source-list">
|
<div class="source-list">
|
||||||
|
|||||||
@@ -127,7 +127,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 { addStockIoWithDetail } from "@/api/wms/stockIo";
|
||||||
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
|
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
|
||||||
import ProductSelect from "@/components/KLPService/ProductSelect";
|
import ProductSelect from "@/components/KLPService/ProductSelect";
|
||||||
@@ -247,11 +247,19 @@ export default {
|
|||||||
/** 查询库存列表 */
|
/** 查询库存列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listStock(this.queryParams).then(response => {
|
if (this.warehouseType === 'real') {
|
||||||
this.stockList = response.rows;
|
getStockByActual(this.queryParams).then(response => {
|
||||||
this.total = response.total;
|
this.stockList = response.rows;
|
||||||
this.loading = false;
|
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) {
|
handleTreeSelect(node) {
|
||||||
|
|||||||
Reference in New Issue
Block a user