fix:禅道014、015

This commit is contained in:
shijing 2025-07-18 14:54:40 +08:00
parent 70ae1a6aab
commit 87a43199c4
2 changed files with 43 additions and 15 deletions

View File

@ -80,10 +80,10 @@
<el-table-column <el-table-column
label="批次号" label="批次号"
prop="batch" prop="batch"
min-width="120" min-width="150"
> >
<template #default="scope"> <template #default="scope">
<el-link @click="rowClick(scope.row)" type="primary">{{scope.row.batch}}</el-link> <span @click="rowClick(scope.row)" style="color:#0052d9;font-weight: 600;cursor: pointer;">{{scope.row.batch}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -202,9 +202,20 @@
<el-drawer v-model="wprVisibleDrawer" :size="'70%'"> <el-drawer v-model="wprVisibleDrawer" :size="'70%'">
<template #header> <template #header>
<h4>关联产品</h4> <h4>关联产品</h4>
<el-input
style="margin-right: 5px;width: 200px;"
v-model="wprsearch"
placeholder="编号"
clearable
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="handleWprQuery"
></el-button>
</template> </template>
<template #default> <template #default>
<scTable ref="wprTable" hidePagination :data="wprList"> <el-table ref="wprTable" id="wprTable" :height="wprTableHeight" hidePagination highlight-current-row border :data="wprList">
<el-table-column label="产品编号" prop="number" min-width="100px"></el-table-column> <el-table-column label="产品编号" prop="number" min-width="100px"></el-table-column>
<el-table-column label="记录数据" prop="oinfo"> <el-table-column label="记录数据" prop="oinfo">
<template #default="scope"> <template #default="scope">
@ -227,20 +238,20 @@
label="操作" label="操作"
fixed="right" fixed="right"
align="center" align="center"
width="120" width="200"
> >
<template #default="scope"> <template #default="scope">
<el-link :underline="false" @click="QRCode(scope.row,'wpr')" type="primary" v-if="mgroupName=='毛坯检测后打码'">二维码</el-link> <el-button v-if="mgroupName=='毛坯检测后打码'" @click="QRCode(scope.row,'wpr')" type="success">二维码</el-button>
<el-link :underline="false" @click="printMaterial(scope.row,'wpr')" type="primary">打印标签</el-link> <el-button @click="printMaterial(scope.row,'wpr')" type="primary">打印标签</el-button>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </el-table>
</template> </template>
<template #footer> <!-- <template #footer>
<div style="flex: auto"> <div style="flex: auto">
<el-button @click="wprVisibleDrawer=false">关闭</el-button> <el-button @click="wprVisibleDrawer=false">关闭</el-button>
</div> </div>
</template> </template> -->
</el-drawer> </el-drawer>
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false"> <el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
<scDegra <scDegra
@ -341,6 +352,8 @@ export default {
page:0, page:0,
wm: "" wm: ""
}, },
wprTableHeight: 500,
wprsearch:"",
route_code:"", route_code:"",
showBatch: "", showBatch: "",
wmMaterial:'', wmMaterial:'',
@ -470,12 +483,27 @@ export default {
handleQuery() { handleQuery() {
this.$refs.table.queryData(this.query); this.$refs.table.queryData(this.query);
}, },
handleWprQuery(){
let that = this;
that.wprList.forEach((item,index)=>{
if(item.number.indexOf(that.wprsearch) > -1){
let rows = document.querySelectorAll("#wprTable .el-table__row");
let row = rows[index];
let rowTop = row.offsetTop;
this.$refs.wprTable.scrollTo({ top: rowTop });
}
})
},
showWpr(row){ showWpr(row){
let that = this; let that = this;
that.ofrom_name = row.material_ofrom_name; that.ofrom_name = row.material_ofrom_name;
that.ofrom_batch = row.batch; that.ofrom_batch = row.batch;
that.wprParams.wm = row.id; that.wprParams.wm = row.id;
that.wprVisibleDrawer = true; that.wprVisibleDrawer = true;
that.$nextTick(() => {
let heights = document.getElementsByClassName("el-drawer__body")[0].clientHeight;
that.wprTableHeight = heights-20;
})
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => { this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
that.wprList = res; that.wprList = res;
}) })

View File

@ -55,7 +55,7 @@
<el-table-column <el-table-column
label="物料名称" label="物料名称"
prop="material_name" prop="material_name"
min-width="150" min-width="120"
> >
<template #default="scope"> <template #default="scope">
{{ scope.row.material_name }} {{ scope.row.material_name }}
@ -81,10 +81,10 @@
<el-table-column <el-table-column
label="批次号" label="批次号"
prop="batch" prop="batch"
min-width="120" min-width="150"
> >
<template #default="scope"> <template #default="scope">
<el-link @click="rowClick(scope.row)" type="primary">{{scope.row.batch}}</el-link> <span @click="rowClick(scope.row)" style="color:#0052d9;font-weight: 600;cursor: pointer;">{{scope.row.batch}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column