feat:禅道367

This commit is contained in:
shijing 2026-04-15 11:12:20 +08:00
parent 724d313185
commit 4a9555f034
1 changed files with 41 additions and 28 deletions

View File

@ -19,6 +19,7 @@
:value="item.id"
></el-option>
</el-select>
<el-text style="margin-left: 1vw;cursor: pointer;" @click="handleWatch">仓库总数{{ totalCount }}</el-text>
</div>
<div class="right-panel">
<el-input
@ -75,9 +76,6 @@
<el-table-column width="80">
<template #default="scope">
<el-button @click="printMaterial(scope.row)" type="text">打签</el-button>
<!-- <el-link :underline="false" type="primary"
@click="handleWatch(scope.row)"
>流程图</el-link> -->
</template>
</el-table-column>
</scTable>
@ -89,11 +87,6 @@
<el-header>
<div class="left-panel">
<span style="font-size: 14px">车间库存</span>
<!-- <el-select v-model="queryWm.material__process" clearable placeholder="已到工序" @change="handleQueryWm"
style="margin-left: 4px">
<el-option v-for="item in processOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select> -->
</div>
</el-header>
<el-main>
@ -146,15 +139,18 @@
:mtype="wmtype"
:apiObj="apiObjPrint"
></print-dialog>
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
<scDegra
v-if="limitedWatch"
ref="degraDialogs"
:nodes="nodes"
:edges="edges"
:rankdir="'LR'"
>
</scDegra>
<el-drawer v-model="limitedWatch" title="物料仓库合格库存统计" size="80%" @closeDialog="limitedWatch = false">
<el-container>
<el-header style="height: 40%;">
<scTable :data="tableData" hideDo hidePagination row-key="id" style="width: 100%;">
<el-table-column label="物料名" prop="material_name"></el-table-column>
<el-table-column label="数量" prop="count"></el-table-column>
</scTable>
</el-header>
<el-main>
<scEcharts :option="echartsOptions" height="100%"></scEcharts>
</el-main>
</el-container>
</el-drawer>
</el-container>
</template>
@ -176,8 +172,10 @@ export default {
paramsWm: { count__gte: 1, material__type: 10 },
nodes:[],
edges:[],
tableData:[],
queryWm: {},
wmtype:0,
totalCount:0,
print_m:false,
limitedWatch:false,
materialsVisible:false,
@ -240,9 +238,32 @@ export default {
},
mounted() {
this.getWarehouse();
// this.getProcessOptions()
this.getProductCount();
},
methods: {
getProductCount(){
let that = this;
let query ={
select_dept: "",
groupby_dept: "",
material_types: "10",
select_material: "material.name as material_name",
groupby_material: "material.name",
select_material_name: "",
groupby_material_name: ""
};
that.$API.bi.dataset.exec.req("materialCount", {query:query }).then((res) => {
let data = that.tableData = res.data2.ds0;
let totalCount = 0;
data.forEach(item => {
totalCount += item.count;
});
that.totalCount = totalCount;
if (res.echart_options) {
that.echartsOptions = JSON.parse(res.echart_options);
}
})
},
getWarehouse() {
this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => {
this.warehouseOptions = res;
@ -262,16 +283,8 @@ export default {
resetQuery() {
this.query = {};
},
handleWatch(row) {
let that = this;
that.$API.wpm.batchlog.dag.req({batch:row.batch}).then((res) => {
that.nodes = res.nodes;
that.edges = res.edges;
that.limitedWatch = true;
that.$nextTick(() => {
that.$refs.degraDialogs.open();
});
})
handleWatch() {
this.limitedWatch = true;
},
//
printMaterial(row,type){