fix:日志打印

This commit is contained in:
shijing 2024-10-24 17:15:53 +08:00
parent 01500ad0b1
commit 42760326b8
1 changed files with 18 additions and 2 deletions

View File

@ -51,9 +51,11 @@
<el-link type="primary" v-if="scope.row.submit_user==null" @click="table_submit(scope.row)">提交</el-link> <el-link type="primary" v-if="scope.row.submit_user==null" @click="table_submit(scope.row)">提交</el-link>
<el-divider direction="vertical" v-if="scope.row.submit_user==null"></el-divider> <el-divider direction="vertical" v-if="scope.row.submit_user==null"></el-divider>
<el-link type="primary" v-if="scope.row.submit_user==null" @click="table_edit(scope.row)">编辑</el-link> <el-link type="primary" v-if="scope.row.submit_user==null" @click="table_edit(scope.row)">编辑</el-link>
<el-link type="primary" v-else @click="table_show(scope.row)">查看</el-link>
<el-divider direction="vertical" v-if="scope.row.submit_user==null"></el-divider> <el-divider direction="vertical" v-if="scope.row.submit_user==null"></el-divider>
<el-link type="danger" v-if="scope.row.submit_user==null" @click="table_del(scope.row)">删除</el-link> <el-link type="danger" v-if="scope.row.submit_user==null" @click="table_del(scope.row)">删除</el-link>
<el-link type="primary" v-if="scope.row.submit_user!==null" @click="handlePrint(scope.row)">打印</el-link>
<el-divider direction="vertical" v-if="scope.row.submit_user!==null"></el-divider>
<el-link type="primary" v-if="scope.row.submit_user!==null" @click="table_show(scope.row)">查看</el-link>
<!-- <el-link type="danger" v-else @click="table_revert(scope.row)">撤回</el-link> --> <!-- <el-link type="danger" v-else @click="table_revert(scope.row)">撤回</el-link> -->
</template> </template>
</el-table-column> </el-table-column>
@ -69,9 +71,13 @@
@closed="dialog.save = false" @closed="dialog.save = false"
> >
</save-dialog> </save-dialog>
<el-dialog v-model="printVisible" width="1200px">
<print :baseData="rowItem" :type="type" @closePrint="printVisible=false"/>
</el-dialog>
</el-container> </el-container>
</template> </template>
<script> <script>
import print from "./../setting/print/A4.vue";
import saveDialog from "./products_form.vue"; import saveDialog from "./products_form.vue";
export default { export default {
@ -84,7 +90,7 @@ export default {
}, },
name: "mlog", name: "mlog",
components: { components: {
saveDialog, saveDialog,print
}, },
data() { data() {
return { return {
@ -95,20 +101,25 @@ export default {
save: false, save: false,
detail: false, detail: false,
}, },
type:'',
tableData: [], tableData: [],
selection: [], selection: [],
rowItem:{},
mtask: "", mtask: "",
mlogId: "", mlogId: "",
deptId: null, deptId: null,
processId: "", processId: "",
processCate: "", processCate: "",
printVisible:false,
}; };
}, },
mounted() { mounted() {
let that = this; let that = this;
if(that.mgroupName == "size"){ if(that.mgroupName == "size"){
this.type = "productstest_cc";
this.params.material__process__name = "一次超洗"; this.params.material__process__name = "一次超洗";
}else{ }else{
this.type = "productstest_wg";
this.params.material__process__name = "二次超洗"; this.params.material__process__name = "二次超洗";
} }
that.apiObj= this.$API.qm.ftestwork.list; that.apiObj= this.$API.qm.ftestwork.list;
@ -185,6 +196,11 @@ export default {
this.dialog.save = true; this.dialog.save = true;
this.$refs.table.refresh(); this.$refs.table.refresh();
}, },
//
handlePrint(row){
this.rowItem = row;
this.printVisible = true;
},
}, },
}; };
</script> </script>