From 8aa4bb3f8bd7b28e962e90748b53d76944ca83fc Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期三, 08 十一月 2023 19:16:44 +0800 Subject: [PATCH] new file: public/img/image002.png new file: src/views/quality/finishedProductInspection/finishedProduct-print.vue modified: src/views/quality/finishedProductInspection/index.vue modified: src/views/quality/processInspect/index.vue new file: src/views/quality/processInspect/processInspect-print.vue --- src/views/quality/processInspect/index.vue | 39 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/views/quality/processInspect/index.vue b/src/views/quality/processInspect/index.vue index fdc05d8..349f765 100644 --- a/src/views/quality/processInspect/index.vue +++ b/src/views/quality/processInspect/index.vue @@ -12,6 +12,19 @@ <template #toolbar></template> </ttable> </basic-container> + <el-dialog + top="10vh" + title="鎵撳嵃棰勮" + :visible.sync="printDialogVisible" + width="60%"> + <div style="width:100%;height: 60vh;overflow-y: scroll;"> + <printTemplate id="printRaw" :formData="printFormData"></printTemplate> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="()=>{printDialogVisible = false;this.printFormData=null}">鍙� 娑�</el-button> + <el-button type="primary" @click="printFun()">鎵� 鍗�</el-button> + </span> + </el-dialog> </div> </div> </template> @@ -20,14 +33,19 @@ import ttable from '@/views/common/ztt-table.vue' import * as fecha from 'element-ui/lib/utils/date' import processInspectForm from './processInspect-form' - import { page,deleteById } from '@/api/quality/processInspect' + import { transform } from '@/util/fileTransform' + import { page,deleteById,exportProcessInsProduct } from '@/api/quality/processInspect' + import printTemplate from './processInspect-print.vue' export default { components: { processInspectForm, - ttable + ttable, + printTemplate }, data() { return { + printFormData: null, + printDialogVisible: false, result:[{label:'鍏ㄩ儴',value: ''},{label:'鍚堟牸',value: '1'},{label:'涓嶅悎鏍�',value: '0'}], type: [1], prelang: 'processInspect', @@ -153,9 +171,15 @@ }, { text: '瀵煎嚭', + fun: this.exportExcel } ], operator: [{ + text: '鎵撳嵃', + type: 'text', + size: 'small', + fun: this.showPrint + },{ text: '浣滃簾', type: 'text', size: 'small', @@ -172,6 +196,17 @@ }, created() { }, methods: { + showPrint(){ + this.printDialogVisible = true + }, + exportExcel(){ + let queryParam=this.$refs.processInspect.getQueryParam(); + delete queryParam.criteria + console.log(queryParam); + exportProcessInsProduct(queryParam).then((res)=>{ + transform(res) + }) + }, deleteHandle(row){ this.$confirm('纭鍒犻櫎璇ユ暟鎹悧锛�', '鎻愮ず', { confirmButtonText: '纭畾', -- Gitblit v1.9.3