fix:添加工艺路线指导文件的查看

This commit is contained in:
shijing 2025-02-25 17:39:58 +08:00
parent 0ac03b4daf
commit 52456dc155
1 changed files with 29 additions and 65 deletions

View File

@ -3,7 +3,7 @@
<el-drawer
title="日志详情"
v-model="visible"
:size="'90%'"
:size="'95%'"
destroy-on-close
@closed="$emit('closed')"
>
@ -40,6 +40,9 @@
<el-descriptions-item label="创建时间">{{
mlogItem.create_time
}}</el-descriptions-item>
<el-descriptions-item label="指导文件">
<el-button @click="showFile">查看</el-button>
</el-descriptions-item>
</el-descriptions>
<div style="padding: 5px 10px;display: flex;justify-content: end;">
<el-button
@ -101,8 +104,6 @@
</el-tag>
</template>
</el-table-column>
<!-- <el-table-column label="加工前不良" prop="count_pn_jgqbl">
</el-table-column> -->
<el-table-column
label="创建时间"
prop="create_time"
@ -172,63 +173,6 @@
/>
</el-form-item>
</el-col>
<!-- <sc-form-table
hideDelete
:tableHeight="300"
v-model="defectlist"
:addTemplate="addTemplate"
placeholder="暂无数据"
>
<el-table-column prop="number" label="不合格项">
<template #default="scope">
<el-select
v-model="scope.row.defect"
placeholder="不合格项"
clearable
style="width: 100%"
>
<el-option
v-for="item in defectOptions"
:key="item.defect"
:label="item.defect_name"
:value="item.defect"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="数量">
<template #default="scope">
<el-input-number
v-model="scope.row.count"
:min="0"
class="width-100"
controls-position="right"
>
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="open" label="操作" width="60" align="center">
<template #default="scope">
<el-button
v-if="scope.row.id"
text
type="danger"
size="small"
@click="formTableDel(scope.row.id)"
>删除</el-button
>
<el-button
v-else
text
type="primary"
size="small"
@click="formTableSave(scope.row)"
>保存</el-button
>
</template>
</el-table-column>
</sc-form-table> -->
</el-row>
</el-form>
<template #footer>
@ -277,7 +221,6 @@
width="100px"
>
<template #default="scope">
<!-- 批次 v-if="mlogItem.submit_time == null&&mlogItem.material_out_&&mlogItem.material_out_.tracking==10" -->
<el-link
:underline="false"
type="primary"
@ -370,6 +313,12 @@
<print :baseData="mlogItem" :tableData="tableData" :tableData2="tableData2" type="102" @closePrint="printVisible=false"/>
</el-dialog>
</div>
<div v-if="fileVisible" class="file_show">
<div style="display: flex;justify-content: flex-end;padding: 10px 20px;">
<el-icon size="30" class="el-dialog__close" @click="fileVisible=false"><el-icon-close/></el-icon>
</div>
<iframe src="http://49.232.14.174/media/2025/02/24/9%E6%9C%88%E4%BB%BD410_ebI85X4.pdf" style="width: 60%;height: 90%;">预览</iframe>
</div>
</el-drawer>
</template>
<script>
@ -459,6 +408,7 @@ export default {
},
],
},
route_file:'',
handle_date:'',
handle_user:'',
wm:'',
@ -476,6 +426,7 @@ export default {
defectlist:[],
batchNumber:'',
isSubmit:false,
fileVisible:false,
};
},
mounted() {
@ -496,7 +447,6 @@ export default {
let that = this;
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
that.mlogItem = res;
console.log('that.mlogItem',that.mlogItem);
that.routeId = res.route;
that.tracking = res.material_in_.tracking;
if(res.test_file!==null){
@ -512,13 +462,19 @@ export default {
that.$API.wpm.mlogb.list.req(that.paramsOut).then((res) => {
that.tableData2 = res;
})
that.$API.mtm.routepack.list.req({page:0,search:res.routepack_name}).then((res) => {
that.route_file = res[0].document_.file;
})
});
},
//
setData(data) {
Object.assign(this.form, data);
this.getRoute(data.id);
// this.getRoute(data.id);
},
showFile(){
this.fileVisible = true;
},
//
mlogUpdate() {
@ -595,7 +551,6 @@ export default {
that.batchNumber = row.batch;
that.handle_date=that.mlogItem.handle_date;
that.handle_user = that.mlogItem.handle_user;
console.log('that.mlogItem',that.mlogItem);
that.dialog.check_single = true;
if(row.qct==null&&!that.mlogItem.is_fix){
that.$API.qm.qct.list.req({qctmat__material:row.material_out,page:0}).then((res)=>{
@ -696,4 +651,13 @@ export default {
};
</script>
<style></style>
<style scoped>
.file_show{
position: absolute;
width: 100%;
height: 100%;
top: 0;
background: rgb(255,255,255);
z-index: 999;
}
</style>